{"id":20904679,"url":"https://github.com/sage/sageone_api_ruby_sdk","last_synced_at":"2025-05-13T05:30:44.510Z","repository":{"id":79678756,"uuid":"50499085","full_name":"Sage/sageone_api_ruby_sdk","owner":"Sage","description":"Sage One API - Ruby SDK","archived":true,"fork":false,"pushed_at":"2016-02-18T15:38:29.000Z","size":137,"stargazers_count":2,"open_issues_count":2,"forks_count":8,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-24T01:35:11.404Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://developers.sageone.com/","language":"Ruby","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/Sage.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}},"created_at":"2016-01-27T10:13:54.000Z","updated_at":"2024-03-21T11:02:30.000Z","dependencies_parsed_at":"2023-05-04T06:31:54.083Z","dependency_job_id":null,"html_url":"https://github.com/Sage/sageone_api_ruby_sdk","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sage%2Fsageone_api_ruby_sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sage%2Fsageone_api_ruby_sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sage%2Fsageone_api_ruby_sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sage%2Fsageone_api_ruby_sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sage","download_url":"https://codeload.github.com/Sage/sageone_api_ruby_sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253882696,"owners_count":21978537,"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":[],"created_at":"2024-11-18T13:18:28.472Z","updated_at":"2025-05-13T05:30:44.098Z","avatar_url":"https://github.com/Sage.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SageoneSdk\n\n[![Build Status](https://travis-ci.org/Sage/sageone_api_ruby_sdk.svg?branch=master)](https://travis-ci.org/Sage/sageone_api_ruby_sdk)\n\nThe `sageone_sdk` gem provides Ruby methods for accessing the Sage One API endpoints.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'sageone_sdk'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install sageone_sdk\n\n## Usage\n\n### Authorization\nFurther information on authorisation and token requests is available [here](https://developers.sageone.com/docs/en/v1#authentication).\n\n### Authorization url\nTo generate the authorisation url and to request an access token using a `SageoneSdk::Client`, you need to provide your client_id, client_secret and redirect_uri (callback url).\n\n\nclient = SageoneSdk::Client.new({ client_id: @client_id,\n                                  client_secret: @client_secret,\n                                  redirect_uri: @redirect_uri})\n\nYou can then return the generated authorization_url:\n\nredirect_to client.authorization_url\n\n### Token Request\nTo request an access token using a `SageoneSdk::Client`, you will need to provide the code returned in the parameters from the authorisation url on a successful authorisation\n\nclient = SageoneSdk::Client.new({ client_id: @client_id,\n                                  client_secret: @client_secret,\n                                  redirect_uri: @redirect_uri})\n\nclient.request_access_token(code)\n\n### Refresh access_token request\nTo refresh an access_token using `SageoneSdk::Client`, you will need to provide your refresh_token recieved when the access_token was generated\n\nclient = SageoneSdk::Client.new({ client_id: @client_id,\n                                  client_secret: @client_secret)\n\nclient.refresh_access_token(refresh_token)\n\n### Making requests\nTo create a `SageoneSdk::Client`, and make requests to the apim you need to provide your access_token and signing_secret:\n\n```\n@client = SageoneSdk::Client.new({access_token: @access_token,\n                                  signing_secret: @signing_secret})\n```\n\nFurther information about obtaining these is available [here](https://developers.sageone.com/docs/en/v1#overview).\n\nYou can then call the required method on the `@client`:\n\n```\n@client.bank_accounts\n=\u003e #\u003cSageoneSdk::SDataResponse:0x007faaa9eb1760\n   @data=\n    {\"$totalResults\"=\u003e2,\n     \"$startIndex\"=\u003e0,\n     \"$itemsPerPage\"=\u003e20,\n     \"$resources\"=\u003e\n      [{\"id\"=\u003e214227,\n        \"account_name\"=\u003e\"Current\",\n        #...}]\n    }\u003e\n```\n\n\n## Contributing\n\n1. Fork it ( https://github.com/[my-github-username]/sageone/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsage%2Fsageone_api_ruby_sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsage%2Fsageone_api_ruby_sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsage%2Fsageone_api_ruby_sdk/lists"}