{"id":19752168,"url":"https://github.com/opti/panda_doc","last_synced_at":"2025-09-08T05:33:46.455Z","repository":{"id":3829780,"uuid":"51026771","full_name":"opti/panda_doc","owner":"opti","description":"Ruby wrapper for PandaDoc.com API","archived":false,"fork":false,"pushed_at":"2025-07-26T17:14:05.000Z","size":174,"stargazers_count":11,"open_issues_count":0,"forks_count":19,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-01T05:58:35.326Z","etag":null,"topics":["api-client","ruby","wrapper"],"latest_commit_sha":null,"homepage":null,"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/opti.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2016-02-03T20:03:17.000Z","updated_at":"2025-07-26T17:14:08.000Z","dependencies_parsed_at":"2024-01-19T02:47:32.286Z","dependency_job_id":"84dddda7-354f-4bf7-82a6-83f26e731a44","html_url":"https://github.com/opti/panda_doc","commit_stats":{"total_commits":87,"total_committers":5,"mean_commits":17.4,"dds":"0.13793103448275867","last_synced_commit":"547267a6de8e4a156f557bc53d571eb80c1ef521"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/opti/panda_doc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opti%2Fpanda_doc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opti%2Fpanda_doc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opti%2Fpanda_doc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opti%2Fpanda_doc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opti","download_url":"https://codeload.github.com/opti/panda_doc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opti%2Fpanda_doc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274136610,"owners_count":25228410,"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-09-08T02:00:09.813Z","response_time":121,"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":["api-client","ruby","wrapper"],"created_at":"2024-11-12T02:47:54.668Z","updated_at":"2025-09-08T05:33:46.443Z","avatar_url":"https://github.com/opti.png","language":"Ruby","readme":"# PandaDoc\n\nPandaDoc gem is a simple wrapper for PandaDoc.com API. Please check the official\nAPI [documenation](https://developers.pandadoc.com) for more details.\n\n[![Build Status](https://github.com/opti/panda_doc/actions/workflows/ci.yml/badge.svg)](https://github.com/opti/panda_doc/actions/workflows/ci.yml)\n[![Maintainability](https://api.codeclimate.com/v1/badges/ab0b236ae2c499659214/maintainability)](https://codeclimate.com/github/opti/panda_doc/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/ab0b236ae2c499659214/test_coverage)](https://codeclimate.com/github/opti/panda_doc/test_coverage)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'panda_doc'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install panda_doc\n\n## Configuration\n\nBoth [API-Key](https://developers.pandadoc.com/reference#api-key-authentication-process) and [oAuth2.0 access token](https://developers.pandadoc.com/reference#authentication-process) authentications are supported.\n\n```ruby\nPandaDoc.configure do |config|\n  config.api_key = \"api key\"\nend\n```\n\n```ruby\nPandaDoc.configure do |config|\n  config.access_token = \"an access token\"\nend\n```\n\n## Usage\n\nEvery response wrapped into a ruby object with values coerced in corresponding types.\n\n#### Creating a document\n\n```ruby\ndocument = PandaDoc::Document.create(\n  name: \"Sample Document\",\n  url: \"url_to_a_document\",\n  recipients: [\n    {\n      email: \"john.appleseed@yourdomain.com\",\n      first_name: \"John\",\n      last_name: \"Appleseed\",\n      role: \"Signer\",\n      default: false\n    }\n  ],\n  fields: {\n    field_id: {\n      title: \"Field 1\"\n    }\n  }\n)\n\ndocument.uuid # =\u003e \"oovHPtkwDqEAvaKmdud\"\ndocument.name # =\u003e \"Sample Document\"\ndocument.status # =\u003e \"uploaded\"\ndocument.created_at # =\u003e #\u003cDateTime: 2016-02-03T14:56:21-08:00\u003e\ndocument.updated_at # =\u003e #\u003cDateTime: 2016-02-03T14:56:21-08:00\u003e\n```\n\n#### Creating a document from attached file ([API](https://developers.pandadoc.com/reference#create-document-from-pdf))\n\n```ruby\nfile = UploadIO.new(\"/path/to/file.pdf\", \"application/pdf\")\n\ndocument = PandaDoc::Document.create(\n  name: \"Sample Document\",\n  file: file,\n  recipients: [\n    {\n      email: \"john.appleseed@yourdomain.com\",\n      first_name: \"John\",\n      last_name: \"Appleseed\",\n      role: \"Signer\",\n      default: false\n    }\n  ],\n  fields: {\n    field_id: {\n      title: \"Field 1\"\n    }\n  }\n)\n```\n\n#### Creating a document from a template ([API](https://developers.pandadoc.com/reference#create-document-from-pandadoc-template))\n\n```ruby\ndocument = PandaDoc::Document.create(\n  name: \"Sample Document\",\n  template_uuid: \"uuid_of_the_template\",\n  recipients: [\n    {\n      email: \"john.appleseed@yourdomain.com\",\n      first_name: \"John\",\n      last_name: \"Appleseed\",\n      role: \"Signer\",\n      default: false\n    }\n  ],\n  tokens: [\n    { name: \"Token.Name\", value: \"Token Value\" },\n    { name: \"Token.AnotherName\", value: \"2021\" }\n  ],\n  fields: {\n    field_id: {\n      value: \"Field 1\"\n    }\n  }\n)\n```\n\n#### Getting a document status ([API](https://developers.pandadoc.com/reference#document-status))\n\n```ruby\ndocument = PandaDoc::Document.find(\"UUID\")\n\ndocument.status       # =\u003e \"draft\"\ndocument.updated_at   # =\u003e \u003cDateTime: 2016-02-03T17:41:00-08:00\u003e\n```\n\n#### Getting a document details ([API](https://developers.pandadoc.com/reference#document-details))\n\n```ruby\ndocument = PandaDoc::Document.details(\"UUID\")\n\ndocument.tokens\n=\u003e [#\u003cPandaDoc::Objects::Token name=\"Token.Name\" value=\"Token Value\"\u003e,\n    #\u003cPandaDoc::Objects::Token name=\"token.another_name\" value=\"2021\"\u003e]\n\ndocument.fields\n=\u003e [#\u003cPandaDoc::Objects::Field uuid=\"...\u003e,\n    #\u003cPandaDoc::Objects::Field uuid=\"...\u003e]\n```\n\n#### Sending a document ([API](https://developers.pandadoc.com/reference#send-document))\n\n```ruby\nPandaDoc::Document.send(\"UUID\", message: \"A message to include into the email\")\n```\n\n#### Creating a View Session\n\n```ruby\nsession = PandaDoc::Document.session(\"UUID\",\n  recipient: \"john.applessed@yourdoamin.com\",\n  lifetime: 300\n)\n\nsession.id # =\u003e \"adssdAvyDXBS\"\nsession.expires_at # =\u003e #\u003cDateTime: 2016-02-03T14:56:21-08:00\u003e\n```\n\n#### Downloading a document ([API](https://developers.pandadoc.com/reference#download-document))\n\n```ruby\nresponse = PandaDoc::Document.download(\"uuid\")\nfile = File.open(\"document.pdf\", \"w\") do |f|\n  response.body\nend\n```\n\n#### Listing document sections ([API](https://developers.pandadoc.com/reference/document-sections-info))\n\n```ruby\nsections = PandaDoc::DocumentSection.list(\"document_uuid\")\n\nsections.results.each do |section|\n  puts section.uuid\n  puts section.name\n  puts section.status\nend\n```\n\n#### Creating a document section ([API](https://developers.pandadoc.com/reference/create-document-section))\n\n```ruby\nsection = PandaDoc::DocumentSection.create(\n  \"document_uuid\",\n  name: \"Section Name\",\n  file: file\n)\n\nsection.uuid # =\u003e \"section_uuid\"\nsection.name # =\u003e \"Section Name\"\nsection.status # =\u003e \"uploaded\"\n```\n\n#### Deleting a document section ([API](https://developers.pandadoc.com/reference/delete-section))\n\n```ruby\nPandaDoc::DocumentSection.delete(\"document_uuid\", \"section_uuid\")\n```\n\n#### Error handling\n\nIf an error occurs during an API request it will be wrapped into a plain ruby\nobject as well.\n\n```ruby\nbegin\n  PandaDoc::Document.create(name: \"Sample Document\")\nrescue PandaDoc::FailureResult =\u003e e\n  puts e.detail\n  puts e.response\nend\n```\n\n#### Debugging\n\nYou can configure a logger if you need to debug your requests/responses\n\n```ruby\nrequire 'logger'\nPandaDoc.configure do |config|\n  config.logger = Logger.new(STDOUT)\nend\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/opti/panda_doc.\n\n1. Fork it ( https://github.com/opti/panda_doc/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\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopti%2Fpanda_doc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopti%2Fpanda_doc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopti%2Fpanda_doc/lists"}