├── .swagger-codegen └── VERSION ├── runLinter.sh ├── .rspec ├── tests ├── Gemfile ├── docs │ └── Test.pdf └── spec │ └── unit_tests_using_jwt_spec.rb ├── Gemfile ├── Rakefile ├── lib └── docusign_rooms │ ├── version.rb │ ├── models │ ├── product_version.rb │ ├── account_status.rb │ ├── listing_type.rb │ ├── room_status.rb │ ├── access_level.rb │ ├── fields_custom_data_filter_type.rb │ ├── roles_filter_context_types.rb │ ├── member_sorting_option.rb │ ├── room_user_sorting_option.rb │ ├── room_picture.rb │ ├── external_form_fill_session.rb │ ├── field_data.rb │ ├── nullable_field_data.rb │ ├── field_data_for_create.rb │ ├── field_data_for_update.rb │ ├── global_states.rb │ ├── envelope.rb │ ├── global_countries.rb │ ├── room_user_removal_detail.rb │ ├── global_time_zones.rb │ ├── global_currencies.rb │ ├── task_list_for_create.rb │ ├── global_contact_sides.rb │ ├── global_task_statuses.rb │ └── form_group_for_create.rb │ ├── client │ └── api_error.rb │ └── api │ ├── states_api.rb │ ├── countries_api.rb │ ├── time_zones_api.rb │ ├── contact_sides_api.rb │ ├── task_statuses_api.rb │ ├── property_types_api.rb │ ├── activity_types_api.rb │ ├── financing_types_api.rb │ ├── transaction_sides_api.rb │ ├── currencies_api.rb │ ├── closing_statuses_api.rb │ ├── seller_decision_types_api.rb │ ├── origins_of_leads_api.rb │ ├── room_contact_types_api.rb │ ├── task_date_types_api.rb │ ├── special_circumstance_types_api.rb │ ├── task_responsibility_types_api.rb │ ├── accounts_api.rb │ ├── form_details_api.rb │ ├── room_envelopes_api.rb │ ├── e_sign_permission_profiles_api.rb │ ├── task_list_templates_api.rb │ ├── external_form_fill_sessions_api.rb │ ├── form_group_forms_api.rb │ ├── room_folders_api.rb │ ├── fields_api.rb │ ├── form_provider_associations_api.rb │ └── room_templates_api.rb ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── .gitignore ├── .swagger-codegen-ignore ├── git_push.sh ├── docusign_rooms.gemspec ├── README.md └── .rubocop.yml /.swagger-codegen/VERSION: -------------------------------------------------------------------------------- 1 | 2.4.21-SNAPSHOT -------------------------------------------------------------------------------- /runLinter.sh: -------------------------------------------------------------------------------- 1 | ./vendor/bundle/ruby/2.6.0/bin/rubocop -a -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | --require spec_helper 3 | --debuger 4 | -------------------------------------------------------------------------------- /tests/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'rspec' 4 | 5 | gem 'docusign_rooms', path: '../' 6 | -------------------------------------------------------------------------------- /tests/docs/Test.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/docusign/docusign-rooms-ruby-client/master/tests/docs/Test.pdf -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gemspec 4 | 5 | group :development, :test do 6 | gem 'rake', '~> 12.3.3' 7 | end 8 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | begin 2 | require 'rspec/core/rake_task' 3 | 4 | RSpec::Core::RakeTask.new(:spec) 5 | task default: :spec 6 | rescue LoadError 7 | # no rspec available 8 | end 9 | -------------------------------------------------------------------------------- /lib/docusign_rooms/version.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | module DocuSign_Rooms 13 | VERSION = '1.3.0' 14 | end 15 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | branches: 2 | only: 3 | - master 4 | language: ruby 5 | #before_install: openssl aes-256-cbc -K $encrypted_7aa52200b8fc_key -iv $encrypted_7aa52200b8fc_iv -in tests/keys/docusign_private_key.txt.enc -out tests/keys/docusign_private_key.txt -d 6 | # command to install dependencies 7 | install: cd tests/spec && bundle install 8 | # command to run tests 9 | script: bundle exec rspec unit_tests_using_jwt_spec.rb --format documentation 10 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # DocuSign Rooms Ruby Client Changelog 2 | See [DocuSign Support Center](https://support.docusign.com/en/releasenotes/) for Product Release Notes. 3 | 4 | ## [v1.3.0] - Rooms API v2-1.1.0 - 2023-01-30 5 | ### Changed 6 | - Added support for version v2-1.1.0 of the DocuSign Rooms API. 7 | - Updated the SDK release version. 8 | 9 | ## [1.2.0.rc1] - Rooms API v2-1.0.9 - 2021-10-04 10 | ### Changed 11 | - Added support for version v2-1.0.9 of the DocuSign Rooms API. 12 | - Updated the SDK release version. 13 | 14 | 15 | ## [v1.1.0.rc1] - Rooms API v2-1.0.8 - 2020-12-17 16 | ### Changed 17 | - Added support for version v2-1.0.8 of the DocuSign Rooms API. 18 | - Updated the SDK release version. 19 | 20 | ## [v1.0.0] - Rooms API v2-1.0.7 - 2020-10-15 21 | ### Changed 22 | - First GA version of Rooms API. -------------------------------------------------------------------------------- /lib/docusign_rooms/models/product_version.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class ProductVersion 16 | 17 | V5 = 'v5'.freeze 18 | V6 = 'v6'.freeze 19 | 20 | # Builds the enum from string 21 | # @param [String] The enum value in the form of the string 22 | # @return [String] The enum value 23 | def build_from_hash(value) 24 | constantValues = ProductVersion.constants.select { |c| ProductVersion::const_get(c) == value } 25 | raise "Invalid ENUM value #{value} for class #ProductVersion" if constantValues.empty? 26 | value 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/docusign_rooms/models/account_status.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class AccountStatus 16 | 17 | ACTIVE = 'Active'.freeze 18 | PENDING = 'Pending'.freeze 19 | 20 | # Builds the enum from string 21 | # @param [String] The enum value in the form of the string 22 | # @return [String] The enum value 23 | def build_from_hash(value) 24 | constantValues = AccountStatus.constants.select { |c| AccountStatus::const_get(c) == value } 25 | raise "Invalid ENUM value #{value} for class #AccountStatus" if constantValues.empty? 26 | value 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/docusign_rooms/models/listing_type.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class ListingType 16 | 17 | PUBLIC_RECORDS = 'PublicRecords'.freeze 18 | MLS = 'MLS'.freeze 19 | 20 | # Builds the enum from string 21 | # @param [String] The enum value in the form of the string 22 | # @return [String] The enum value 23 | def build_from_hash(value) 24 | constantValues = ListingType.constants.select { |c| ListingType::const_get(c) == value } 25 | raise "Invalid ENUM value #{value} for class #ListingType" if constantValues.empty? 26 | value 27 | end 28 | end 29 | end 30 | -------------------------------------------------------------------------------- /lib/docusign_rooms/models/room_status.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class RoomStatus 16 | 17 | ACTIVE = 'Active'.freeze 18 | PENDING = 'Pending'.freeze 19 | CLOSED = 'Closed'.freeze 20 | OPEN = 'Open'.freeze 21 | 22 | # Builds the enum from string 23 | # @param [String] The enum value in the form of the string 24 | # @return [String] The enum value 25 | def build_from_hash(value) 26 | constantValues = RoomStatus.constants.select { |c| RoomStatus::const_get(c) == value } 27 | raise "Invalid ENUM value #{value} for class #RoomStatus" if constantValues.empty? 28 | value 29 | end 30 | end 31 | end 32 | -------------------------------------------------------------------------------- /lib/docusign_rooms/models/access_level.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class AccessLevel 16 | 17 | CONTRIBUTOR = 'Contributor'.freeze 18 | OFFICE = 'Office'.freeze 19 | REGION = 'Region'.freeze 20 | COMPANY = 'Company'.freeze 21 | ADMIN = 'Admin'.freeze 22 | 23 | # Builds the enum from string 24 | # @param [String] The enum value in the form of the string 25 | # @return [String] The enum value 26 | def build_from_hash(value) 27 | constantValues = AccessLevel.constants.select { |c| AccessLevel::const_get(c) == value } 28 | raise "Invalid ENUM value #{value} for class #AccessLevel" if constantValues.empty? 29 | value 30 | end 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /lib/docusign_rooms/models/fields_custom_data_filter_type.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class FieldsCustomDataFilterType 16 | 17 | NONE = 'None'.freeze 18 | IS_REQUIRED_ON_CREATE = 'IsRequiredOnCreate'.freeze 19 | IS_REQUIRED_ON_SUBMIT = 'IsRequiredOnSubmit'.freeze 20 | 21 | # Builds the enum from string 22 | # @param [String] The enum value in the form of the string 23 | # @return [String] The enum value 24 | def build_from_hash(value) 25 | constantValues = FieldsCustomDataFilterType.constants.select { |c| FieldsCustomDataFilterType::const_get(c) == value } 26 | raise "Invalid ENUM value #{value} for class #FieldsCustomDataFilterType" if constantValues.empty? 27 | value 28 | end 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /lib/docusign_rooms/client/api_error.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | module DocuSign_Rooms 13 | class ApiError < StandardError 14 | attr_reader :code, :response_headers, :response_body 15 | 16 | # Usage examples: 17 | # ApiError.new 18 | # ApiError.new("message") 19 | # ApiError.new(:code => 500, :response_headers => {}, :response_body => "") 20 | # ApiError.new(:code => 404, :message => "Not Found") 21 | def initialize(arg = nil) 22 | if arg.is_a? Hash 23 | if arg.key?(:message) || arg.key?('message') 24 | super(arg[:message] || arg['message']) 25 | else 26 | super arg 27 | end 28 | 29 | arg.each do |k, v| 30 | instance_variable_set "@#{k}", v 31 | end 32 | else 33 | super arg 34 | end 35 | end 36 | end 37 | end 38 | -------------------------------------------------------------------------------- /lib/docusign_rooms/models/roles_filter_context_types.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class RolesFilterContextTypes 16 | 17 | ALL_ROLES = 'AllRoles'.freeze 18 | ASSIGNABLE_ROLES_BASED_ON_COMPANY_PERMISSIONS = 'AssignableRolesBasedOnCompanyPermissions'.freeze 19 | ASSIGNABLE_ROLES_BASED_ON_ALL_PERMISSIONS = 'AssignableRolesBasedOnAllPermissions'.freeze 20 | 21 | # Builds the enum from string 22 | # @param [String] The enum value in the form of the string 23 | # @return [String] The enum value 24 | def build_from_hash(value) 25 | constantValues = RolesFilterContextTypes.constants.select { |c| RolesFilterContextTypes::const_get(c) == value } 26 | raise "Invalid ENUM value #{value} for class #RolesFilterContextTypes" if constantValues.empty? 27 | value 28 | end 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /lib/docusign_rooms/models/member_sorting_option.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class MemberSortingOption 16 | 17 | FIRST_NAME_ASC = 'FirstNameAsc'.freeze 18 | LAST_NAME_ASC = 'LastNameAsc'.freeze 19 | EMAIL_ASC = 'EmailAsc'.freeze 20 | FIRST_NAME_DESC = 'FirstNameDesc'.freeze 21 | LAST_NAME_DESC = 'LastNameDesc'.freeze 22 | EMAIL_DESC = 'EmailDesc'.freeze 23 | 24 | # Builds the enum from string 25 | # @param [String] The enum value in the form of the string 26 | # @return [String] The enum value 27 | def build_from_hash(value) 28 | constantValues = MemberSortingOption.constants.select { |c| MemberSortingOption::const_get(c) == value } 29 | raise "Invalid ENUM value #{value} for class #MemberSortingOption" if constantValues.empty? 30 | value 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /lib/docusign_rooms/models/room_user_sorting_option.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class RoomUserSortingOption 16 | 17 | FIRST_NAME_ASC = 'FirstNameAsc'.freeze 18 | LAST_NAME_ASC = 'LastNameAsc'.freeze 19 | EMAIL_ASC = 'EmailAsc'.freeze 20 | FIRST_NAME_DESC = 'FirstNameDesc'.freeze 21 | LAST_NAME_DESC = 'LastNameDesc'.freeze 22 | EMAIL_DESC = 'EmailDesc'.freeze 23 | 24 | # Builds the enum from string 25 | # @param [String] The enum value in the form of the string 26 | # @return [String] The enum value 27 | def build_from_hash(value) 28 | constantValues = RoomUserSortingOption.constants.select { |c| RoomUserSortingOption::const_get(c) == value } 29 | raise "Invalid ENUM value #{value} for class #RoomUserSortingOption" if constantValues.empty? 30 | value 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2017- DocuSign, Inc. (https://www.docusign.com) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.gem 3 | *.rbc 4 | /.config 5 | /coverage/ 6 | /InstalledFiles 7 | /pkg/ 8 | /spec/reports/ 9 | /spec/examples.txt 10 | /test/tmp/ 11 | /test/version_tmp/ 12 | /tmp/ 13 | /.idea/ 14 | 15 | # Used by dotenv library to load environment variables. 16 | # .env 17 | 18 | ## Specific to RubyMotion: 19 | .dat* 20 | .repl_history 21 | build/ 22 | *.bridgesupport 23 | build-iPhoneOS/ 24 | build-iPhoneSimulator/ 25 | 26 | ## Specific to RubyMotion (use of CocoaPods): 27 | # 28 | # We recommend against adding the Pods directory to your .gitignore. However 29 | # you should judge for yourself, the pros and cons are mentioned at: 30 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 31 | # 32 | # vendor/Pods/ 33 | 34 | ## Documentation cache and generated files: 35 | /.yardoc/ 36 | /_yardoc/ 37 | /doc/ 38 | /rdoc/ 39 | 40 | ## Environment normalization: 41 | /.bundle/ 42 | /vendor/bundle 43 | /lib/bundler/man/ 44 | 45 | # for a library or gem, you might want to ignore these files since the code is 46 | # intended to run in multiple environments; otherwise, check them in: 47 | # Gemfile.lock 48 | # .ruby-version 49 | # .ruby-gemset 50 | 51 | # unless supporting rvm < 1.11.0 or doing something fancy, ignore this: 52 | .rvmrc 53 | 54 | tests/docs/private.pem 55 | Gemfile.* -------------------------------------------------------------------------------- /.swagger-codegen-ignore: -------------------------------------------------------------------------------- 1 | # Swagger Codegen Ignore 2 | 3 | # Use this file to prevent files from being overwritten by the generator. 4 | # The patterns follow closely to .gitignore or .dockerignore. 5 | 6 | # As an example, the C# client generator defines ApiClient.cs. 7 | # You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: 8 | #ApiClient.cs 9 | 10 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 11 | #foo/*/qux 12 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 13 | 14 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 15 | #foo/**/qux 16 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 17 | 18 | # You can also negate patterns with an exclamation (!). 19 | # For example, you can ignore all files in a docs folder with the file extension .md: 20 | #docs/*.md 21 | # Then explicitly reverse the ignore rule for a single file: 22 | #!docs/README.md 23 | 24 | # Swagger and Git files 25 | .swagger-codegen-ignore 26 | git_push.sh 27 | .gitignore 28 | README.md 29 | CHANGELOG.md 30 | best_practices.md 31 | 32 | 33 | # Project files 34 | LICENSE 35 | .travis.yml 36 | Gemfile 37 | Gemfile.lock 38 | Rakefile 39 | 40 | 41 | # Specific src and test files 42 | .rspec 43 | docs/ 44 | spec/ 45 | tests/ 46 | -------------------------------------------------------------------------------- /git_push.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Generated by: https://github.com/swagger-api/swagger-codegen.git 4 | # 5 | # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ 6 | # 7 | # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" 8 | 9 | git_user_id=$1 10 | git_repo_id=$2 11 | release_note=$3 12 | 13 | if [ "$git_user_id" = "" ]; then 14 | git_user_id="GIT_USER_ID" 15 | echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" 16 | fi 17 | 18 | if [ "$git_repo_id" = "" ]; then 19 | git_repo_id="GIT_REPO_ID" 20 | echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" 21 | fi 22 | 23 | if [ "$release_note" = "" ]; then 24 | release_note="Minor update" 25 | echo "[INFO] No command line input provided. Set \$release_note to $release_note" 26 | fi 27 | 28 | # Initialize the local directory as a Git repository 29 | git init 30 | 31 | # Adds the files in the local repository and stages them for commit. 32 | git add . 33 | 34 | # Commits the tracked changes and prepares them to be pushed to a remote repository. 35 | git commit -m "$release_note" 36 | 37 | # Sets the new remote 38 | git_remote=`git remote` 39 | if [ "$git_remote" = "" ]; then # git remote not defined 40 | 41 | if [ "$GIT_TOKEN" = "" ]; then 42 | echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." 43 | git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git 44 | else 45 | git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git 46 | fi 47 | 48 | fi 49 | 50 | git pull origin master 51 | 52 | # Pushes (Forces) the changes in the local repository up to the remote repository 53 | echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" 54 | git push origin master 2>&1 | grep -v 'To https' 55 | 56 | -------------------------------------------------------------------------------- /docusign_rooms.gemspec: -------------------------------------------------------------------------------- 1 | # -*- encoding: utf-8 -*- 2 | 3 | =begin 4 | #DocuSign Rooms API - v2 5 | 6 | #An API for an integrator to access the features of DocuSign Rooms 7 | 8 | OpenAPI spec version: v2 9 | Contact: devcenter@docusign.com 10 | Generated by: https://github.com/swagger-api/swagger-codegen.git 11 | 12 | =end 13 | 14 | $:.push File.expand_path("../lib", __FILE__) 15 | require "docusign_rooms/version" 16 | 17 | Gem::Specification.new do |s| 18 | s.name = "docusign_rooms" 19 | s.version = DocuSign_Rooms::VERSION 20 | s.platform = Gem::Platform::RUBY 21 | s.authors = ["DocuSign"] 22 | s.email = ["devcenter@docusign.com"] 23 | s.homepage = "https://github.com/docusign/docusign-rooms-ruby-client" 24 | s.summary = "DocuSign Rooms API - v2 Ruby Gem" 25 | s.description = "The DocuSign package makes integrating DocuSign into your apps and websites a super fast and painless process. The library is open sourced on GitHub, look for the docusign-rooms-ruby-client repository." 26 | s.license = "MIT" 27 | s.required_ruby_version = ">= 1.9" 28 | 29 | s.add_runtime_dependency 'jwt', '~> 2.2', '>= 2.2.1' 30 | s.add_runtime_dependency 'addressable', '~> 2.7', '>= 2.7.0' 31 | s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' 32 | s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0' 33 | 34 | s.add_development_dependency 'rspec-mocks', '~> 3.8', '>= 3.8.0' 35 | s.add_development_dependency 'rspec-expectations', '~> 3.8', '>= 3.8.0' 36 | s.add_development_dependency 'rspec', '~> 3.4', '>= 3.4.0' 37 | s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1' 38 | s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3' 39 | s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6' 40 | s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2' 41 | s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16' 42 | s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.11' 43 | 44 | s.files = `find *`.split("\n").uniq.sort.select{|f| !f.empty? } 45 | s.test_files = `find spec/*`.split("\n") 46 | s.executables = [] 47 | s.require_paths = ["lib"] 48 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/states_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | 17 | class StatesApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = StatesApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Retrieves the list of valid states. 25 | # Returns a list of states. 26 | # @return [GlobalStates] 27 | def get_states() 28 | data, _status_code, _headers = get_states_with_http_info() 29 | return data 30 | end 31 | 32 | # Retrieves the list of valid states. 33 | # Returns a list of states. 34 | # @return [Array<(GlobalStates, Fixnum, Hash)>] GlobalStates data, response status code and response headers 35 | def get_states_with_http_info() 36 | if @api_client.config.debugging 37 | @api_client.config.logger.debug "Calling API: StatesApi.get_states ..." 38 | end 39 | # resource path 40 | local_var_path = "/v2/states".sub('{format}','json') 41 | 42 | # query parameters 43 | query_params = {} 44 | 45 | # header parameters 46 | header_params = {} 47 | # HTTP header 'Accept' (if needed) 48 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 49 | # HTTP header 'Content-Type' 50 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 51 | 52 | # form parameters 53 | form_params = {} 54 | 55 | # http body (model) 56 | post_body = nil 57 | auth_names = [] 58 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 59 | :header_params => header_params, 60 | :query_params => query_params, 61 | :form_params => form_params, 62 | :body => post_body, 63 | :auth_names => auth_names, 64 | :return_type => 'GlobalStates') 65 | if @api_client.config.debugging 66 | @api_client.config.logger.debug "API called: StatesApi#get_states\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 67 | end 68 | return data, status_code, headers 69 | end 70 | end 71 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/countries_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | 17 | class CountriesApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = CountriesApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Retrieves the list of valid countries. 25 | # Returns a list of countries that the API supports 26 | # @return [GlobalCountries] 27 | def get_countries() 28 | data, _status_code, _headers = get_countries_with_http_info() 29 | return data 30 | end 31 | 32 | # Retrieves the list of valid countries. 33 | # Returns a list of countries that the API supports 34 | # @return [Array<(GlobalCountries, Fixnum, Hash)>] GlobalCountries data, response status code and response headers 35 | def get_countries_with_http_info() 36 | if @api_client.config.debugging 37 | @api_client.config.logger.debug "Calling API: CountriesApi.get_countries ..." 38 | end 39 | # resource path 40 | local_var_path = "/v2/countries".sub('{format}','json') 41 | 42 | # query parameters 43 | query_params = {} 44 | 45 | # header parameters 46 | header_params = {} 47 | # HTTP header 'Accept' (if needed) 48 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 49 | # HTTP header 'Content-Type' 50 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 51 | 52 | # form parameters 53 | form_params = {} 54 | 55 | # http body (model) 56 | post_body = nil 57 | auth_names = [] 58 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 59 | :header_params => header_params, 60 | :query_params => query_params, 61 | :form_params => form_params, 62 | :body => post_body, 63 | :auth_names => auth_names, 64 | :return_type => 'GlobalCountries') 65 | if @api_client.config.debugging 66 | @api_client.config.logger.debug "API called: CountriesApi#get_countries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 67 | end 68 | return data, status_code, headers 69 | end 70 | end 71 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/time_zones_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | 17 | class TimeZonesApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = TimeZonesApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Retrieves the list of valid time zones. 25 | # Gets a list of time zones that you can assign to an office. 26 | # @return [GlobalTimeZones] 27 | def get_time_zones() 28 | data, _status_code, _headers = get_time_zones_with_http_info() 29 | return data 30 | end 31 | 32 | # Retrieves the list of valid time zones. 33 | # Gets a list of time zones that you can assign to an office. 34 | # @return [Array<(GlobalTimeZones, Fixnum, Hash)>] GlobalTimeZones data, response status code and response headers 35 | def get_time_zones_with_http_info() 36 | if @api_client.config.debugging 37 | @api_client.config.logger.debug "Calling API: TimeZonesApi.get_time_zones ..." 38 | end 39 | # resource path 40 | local_var_path = "/v2/time_zones".sub('{format}','json') 41 | 42 | # query parameters 43 | query_params = {} 44 | 45 | # header parameters 46 | header_params = {} 47 | # HTTP header 'Accept' (if needed) 48 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 49 | # HTTP header 'Content-Type' 50 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 51 | 52 | # form parameters 53 | form_params = {} 54 | 55 | # http body (model) 56 | post_body = nil 57 | auth_names = [] 58 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 59 | :header_params => header_params, 60 | :query_params => query_params, 61 | :form_params => form_params, 62 | :body => post_body, 63 | :auth_names => auth_names, 64 | :return_type => 'GlobalTimeZones') 65 | if @api_client.config.debugging 66 | @api_client.config.logger.debug "API called: TimeZonesApi#get_time_zones\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 67 | end 68 | return data, status_code, headers 69 | end 70 | end 71 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/contact_sides_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | 17 | class ContactSidesApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = ContactSidesApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Retrieves the list of valid contact sides. 25 | # Returns a list of valid contact sides. 26 | # @return [GlobalContactSides] 27 | def get_contact_sides() 28 | data, _status_code, _headers = get_contact_sides_with_http_info() 29 | return data 30 | end 31 | 32 | # Retrieves the list of valid contact sides. 33 | # Returns a list of valid contact sides. 34 | # @return [Array<(GlobalContactSides, Fixnum, Hash)>] GlobalContactSides data, response status code and response headers 35 | def get_contact_sides_with_http_info() 36 | if @api_client.config.debugging 37 | @api_client.config.logger.debug "Calling API: ContactSidesApi.get_contact_sides ..." 38 | end 39 | # resource path 40 | local_var_path = "/v2/contact_sides".sub('{format}','json') 41 | 42 | # query parameters 43 | query_params = {} 44 | 45 | # header parameters 46 | header_params = {} 47 | # HTTP header 'Accept' (if needed) 48 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 49 | # HTTP header 'Content-Type' 50 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 51 | 52 | # form parameters 53 | form_params = {} 54 | 55 | # http body (model) 56 | post_body = nil 57 | auth_names = [] 58 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 59 | :header_params => header_params, 60 | :query_params => query_params, 61 | :form_params => form_params, 62 | :body => post_body, 63 | :auth_names => auth_names, 64 | :return_type => 'GlobalContactSides') 65 | if @api_client.config.debugging 66 | @api_client.config.logger.debug "API called: ContactSidesApi#get_contact_sides\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 67 | end 68 | return data, status_code, headers 69 | end 70 | end 71 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/task_statuses_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | 17 | class TaskStatusesApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = TaskStatusesApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Retrieves the list of valid task statuses. 25 | # Returns a list of valid task statuses. 26 | # @return [GlobalTaskStatuses] 27 | def get_task_statuses() 28 | data, _status_code, _headers = get_task_statuses_with_http_info() 29 | return data 30 | end 31 | 32 | # Retrieves the list of valid task statuses. 33 | # Returns a list of valid task statuses. 34 | # @return [Array<(GlobalTaskStatuses, Fixnum, Hash)>] GlobalTaskStatuses data, response status code and response headers 35 | def get_task_statuses_with_http_info() 36 | if @api_client.config.debugging 37 | @api_client.config.logger.debug "Calling API: TaskStatusesApi.get_task_statuses ..." 38 | end 39 | # resource path 40 | local_var_path = "/v2/task_statuses".sub('{format}','json') 41 | 42 | # query parameters 43 | query_params = {} 44 | 45 | # header parameters 46 | header_params = {} 47 | # HTTP header 'Accept' (if needed) 48 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 49 | # HTTP header 'Content-Type' 50 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 51 | 52 | # form parameters 53 | form_params = {} 54 | 55 | # http body (model) 56 | post_body = nil 57 | auth_names = [] 58 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 59 | :header_params => header_params, 60 | :query_params => query_params, 61 | :form_params => form_params, 62 | :body => post_body, 63 | :auth_names => auth_names, 64 | :return_type => 'GlobalTaskStatuses') 65 | if @api_client.config.debugging 66 | @api_client.config.logger.debug "API called: TaskStatusesApi#get_task_statuses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 67 | end 68 | return data, status_code, headers 69 | end 70 | end 71 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/property_types_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | 17 | class PropertyTypesApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = PropertyTypesApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Retrieves the list of valid property types. 25 | # Returns a list of property types. 26 | # @return [GlobalPropertyTypes] 27 | def get_property_types() 28 | data, _status_code, _headers = get_property_types_with_http_info() 29 | return data 30 | end 31 | 32 | # Retrieves the list of valid property types. 33 | # Returns a list of property types. 34 | # @return [Array<(GlobalPropertyTypes, Fixnum, Hash)>] GlobalPropertyTypes data, response status code and response headers 35 | def get_property_types_with_http_info() 36 | if @api_client.config.debugging 37 | @api_client.config.logger.debug "Calling API: PropertyTypesApi.get_property_types ..." 38 | end 39 | # resource path 40 | local_var_path = "/v2/property_types".sub('{format}','json') 41 | 42 | # query parameters 43 | query_params = {} 44 | 45 | # header parameters 46 | header_params = {} 47 | # HTTP header 'Accept' (if needed) 48 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 49 | # HTTP header 'Content-Type' 50 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 51 | 52 | # form parameters 53 | form_params = {} 54 | 55 | # http body (model) 56 | post_body = nil 57 | auth_names = [] 58 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 59 | :header_params => header_params, 60 | :query_params => query_params, 61 | :form_params => form_params, 62 | :body => post_body, 63 | :auth_names => auth_names, 64 | :return_type => 'GlobalPropertyTypes') 65 | if @api_client.config.debugging 66 | @api_client.config.logger.debug "API called: PropertyTypesApi#get_property_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 67 | end 68 | return data, status_code, headers 69 | end 70 | end 71 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/activity_types_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | 17 | class ActivityTypesApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = ActivityTypesApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Retrieves the list of valid activity types. 25 | # Returns the list of valid activity types. 26 | # @return [GlobalActivityTypes] 27 | def get_activity_types() 28 | data, _status_code, _headers = get_activity_types_with_http_info() 29 | return data 30 | end 31 | 32 | # Retrieves the list of valid activity types. 33 | # Returns the list of valid activity types. 34 | # @return [Array<(GlobalActivityTypes, Fixnum, Hash)>] GlobalActivityTypes data, response status code and response headers 35 | def get_activity_types_with_http_info() 36 | if @api_client.config.debugging 37 | @api_client.config.logger.debug "Calling API: ActivityTypesApi.get_activity_types ..." 38 | end 39 | # resource path 40 | local_var_path = "/v2/activity_types".sub('{format}','json') 41 | 42 | # query parameters 43 | query_params = {} 44 | 45 | # header parameters 46 | header_params = {} 47 | # HTTP header 'Accept' (if needed) 48 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 49 | # HTTP header 'Content-Type' 50 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 51 | 52 | # form parameters 53 | form_params = {} 54 | 55 | # http body (model) 56 | post_body = nil 57 | auth_names = [] 58 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 59 | :header_params => header_params, 60 | :query_params => query_params, 61 | :form_params => form_params, 62 | :body => post_body, 63 | :auth_names => auth_names, 64 | :return_type => 'GlobalActivityTypes') 65 | if @api_client.config.debugging 66 | @api_client.config.logger.debug "API called: ActivityTypesApi#get_activity_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 67 | end 68 | return data, status_code, headers 69 | end 70 | end 71 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/financing_types_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | 17 | class FinancingTypesApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = FinancingTypesApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Retrieves the list of valid financing types. 25 | # Returns a list of possible financing types 26 | # @return [GlobalFinancingTypes] 27 | def get_financing_types() 28 | data, _status_code, _headers = get_financing_types_with_http_info() 29 | return data 30 | end 31 | 32 | # Retrieves the list of valid financing types. 33 | # Returns a list of possible financing types 34 | # @return [Array<(GlobalFinancingTypes, Fixnum, Hash)>] GlobalFinancingTypes data, response status code and response headers 35 | def get_financing_types_with_http_info() 36 | if @api_client.config.debugging 37 | @api_client.config.logger.debug "Calling API: FinancingTypesApi.get_financing_types ..." 38 | end 39 | # resource path 40 | local_var_path = "/v2/financing_types".sub('{format}','json') 41 | 42 | # query parameters 43 | query_params = {} 44 | 45 | # header parameters 46 | header_params = {} 47 | # HTTP header 'Accept' (if needed) 48 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 49 | # HTTP header 'Content-Type' 50 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 51 | 52 | # form parameters 53 | form_params = {} 54 | 55 | # http body (model) 56 | post_body = nil 57 | auth_names = [] 58 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 59 | :header_params => header_params, 60 | :query_params => query_params, 61 | :form_params => form_params, 62 | :body => post_body, 63 | :auth_names => auth_names, 64 | :return_type => 'GlobalFinancingTypes') 65 | if @api_client.config.debugging 66 | @api_client.config.logger.debug "API called: FinancingTypesApi#get_financing_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 67 | end 68 | return data, status_code, headers 69 | end 70 | end 71 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/transaction_sides_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | 17 | class TransactionSidesApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = TransactionSidesApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Retrieves the list of valid transaction sides. 25 | # Returns a list of valid transaction sides. 26 | # @return [GlobalTransactionSides] 27 | def get_transaction_sides() 28 | data, _status_code, _headers = get_transaction_sides_with_http_info() 29 | return data 30 | end 31 | 32 | # Retrieves the list of valid transaction sides. 33 | # Returns a list of valid transaction sides. 34 | # @return [Array<(GlobalTransactionSides, Fixnum, Hash)>] GlobalTransactionSides data, response status code and response headers 35 | def get_transaction_sides_with_http_info() 36 | if @api_client.config.debugging 37 | @api_client.config.logger.debug "Calling API: TransactionSidesApi.get_transaction_sides ..." 38 | end 39 | # resource path 40 | local_var_path = "/v2/transaction_sides".sub('{format}','json') 41 | 42 | # query parameters 43 | query_params = {} 44 | 45 | # header parameters 46 | header_params = {} 47 | # HTTP header 'Accept' (if needed) 48 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 49 | # HTTP header 'Content-Type' 50 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 51 | 52 | # form parameters 53 | form_params = {} 54 | 55 | # http body (model) 56 | post_body = nil 57 | auth_names = [] 58 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 59 | :header_params => header_params, 60 | :query_params => query_params, 61 | :form_params => form_params, 62 | :body => post_body, 63 | :auth_names => auth_names, 64 | :return_type => 'GlobalTransactionSides') 65 | if @api_client.config.debugging 66 | @api_client.config.logger.debug "API called: TransactionSidesApi#get_transaction_sides\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 67 | end 68 | return data, status_code, headers 69 | end 70 | end 71 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/currencies_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | 17 | class CurrenciesApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = CurrenciesApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Retrieves the list of valid currencies. 25 | # Returns a list of valid values for the currencies that you can use for listing, offer, and loan amounts. 26 | # @return [GlobalCurrencies] 27 | def get_currencies() 28 | data, _status_code, _headers = get_currencies_with_http_info() 29 | return data 30 | end 31 | 32 | # Retrieves the list of valid currencies. 33 | # Returns a list of valid values for the currencies that you can use for listing, offer, and loan amounts. 34 | # @return [Array<(GlobalCurrencies, Fixnum, Hash)>] GlobalCurrencies data, response status code and response headers 35 | def get_currencies_with_http_info() 36 | if @api_client.config.debugging 37 | @api_client.config.logger.debug "Calling API: CurrenciesApi.get_currencies ..." 38 | end 39 | # resource path 40 | local_var_path = "/v2/currencies".sub('{format}','json') 41 | 42 | # query parameters 43 | query_params = {} 44 | 45 | # header parameters 46 | header_params = {} 47 | # HTTP header 'Accept' (if needed) 48 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 49 | # HTTP header 'Content-Type' 50 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 51 | 52 | # form parameters 53 | form_params = {} 54 | 55 | # http body (model) 56 | post_body = nil 57 | auth_names = [] 58 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 59 | :header_params => header_params, 60 | :query_params => query_params, 61 | :form_params => form_params, 62 | :body => post_body, 63 | :auth_names => auth_names, 64 | :return_type => 'GlobalCurrencies') 65 | if @api_client.config.debugging 66 | @api_client.config.logger.debug "API called: CurrenciesApi#get_currencies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 67 | end 68 | return data, status_code, headers 69 | end 70 | end 71 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/closing_statuses_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | 17 | class ClosingStatusesApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = ClosingStatusesApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Retrieves the list of valid closing statuses. 25 | # Returns a list of closing statuses, or valid reasons for closing a room. 26 | # @return [GlobalClosingStatuses] 27 | def get_closing_statuses() 28 | data, _status_code, _headers = get_closing_statuses_with_http_info() 29 | return data 30 | end 31 | 32 | # Retrieves the list of valid closing statuses. 33 | # Returns a list of closing statuses, or valid reasons for closing a room. 34 | # @return [Array<(GlobalClosingStatuses, Fixnum, Hash)>] GlobalClosingStatuses data, response status code and response headers 35 | def get_closing_statuses_with_http_info() 36 | if @api_client.config.debugging 37 | @api_client.config.logger.debug "Calling API: ClosingStatusesApi.get_closing_statuses ..." 38 | end 39 | # resource path 40 | local_var_path = "/v2/closing_statuses".sub('{format}','json') 41 | 42 | # query parameters 43 | query_params = {} 44 | 45 | # header parameters 46 | header_params = {} 47 | # HTTP header 'Accept' (if needed) 48 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 49 | # HTTP header 'Content-Type' 50 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 51 | 52 | # form parameters 53 | form_params = {} 54 | 55 | # http body (model) 56 | post_body = nil 57 | auth_names = [] 58 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 59 | :header_params => header_params, 60 | :query_params => query_params, 61 | :form_params => form_params, 62 | :body => post_body, 63 | :auth_names => auth_names, 64 | :return_type => 'GlobalClosingStatuses') 65 | if @api_client.config.debugging 66 | @api_client.config.logger.debug "API called: ClosingStatusesApi#get_closing_statuses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 67 | end 68 | return data, status_code, headers 69 | end 70 | end 71 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/seller_decision_types_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | 17 | class SellerDecisionTypesApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = SellerDecisionTypesApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Retrieves the list of valid seller decision types. 25 | # Returns a list of valid seller decision types. 26 | # @return [GlobalSellerDecisionTypes] 27 | def get_seller_decision_types() 28 | data, _status_code, _headers = get_seller_decision_types_with_http_info() 29 | return data 30 | end 31 | 32 | # Retrieves the list of valid seller decision types. 33 | # Returns a list of valid seller decision types. 34 | # @return [Array<(GlobalSellerDecisionTypes, Fixnum, Hash)>] GlobalSellerDecisionTypes data, response status code and response headers 35 | def get_seller_decision_types_with_http_info() 36 | if @api_client.config.debugging 37 | @api_client.config.logger.debug "Calling API: SellerDecisionTypesApi.get_seller_decision_types ..." 38 | end 39 | # resource path 40 | local_var_path = "/v2/seller_decision_types".sub('{format}','json') 41 | 42 | # query parameters 43 | query_params = {} 44 | 45 | # header parameters 46 | header_params = {} 47 | # HTTP header 'Accept' (if needed) 48 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 49 | # HTTP header 'Content-Type' 50 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 51 | 52 | # form parameters 53 | form_params = {} 54 | 55 | # http body (model) 56 | post_body = nil 57 | auth_names = [] 58 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 59 | :header_params => header_params, 60 | :query_params => query_params, 61 | :form_params => form_params, 62 | :body => post_body, 63 | :auth_names => auth_names, 64 | :return_type => 'GlobalSellerDecisionTypes') 65 | if @api_client.config.debugging 66 | @api_client.config.logger.debug "API called: SellerDecisionTypesApi#get_seller_decision_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 67 | end 68 | return data, status_code, headers 69 | end 70 | end 71 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/origins_of_leads_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | 17 | class OriginsOfLeadsApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = OriginsOfLeadsApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Retrieves the list of valid origins of leads. 25 | # Returns a list of origins of leads (such as Trulia or Zillow) that you can specify for rooms. 26 | # @return [GlobalOriginsOfLeads] 27 | def get_origins_of_leads() 28 | data, _status_code, _headers = get_origins_of_leads_with_http_info() 29 | return data 30 | end 31 | 32 | # Retrieves the list of valid origins of leads. 33 | # Returns a list of origins of leads (such as Trulia or Zillow) that you can specify for rooms. 34 | # @return [Array<(GlobalOriginsOfLeads, Fixnum, Hash)>] GlobalOriginsOfLeads data, response status code and response headers 35 | def get_origins_of_leads_with_http_info() 36 | if @api_client.config.debugging 37 | @api_client.config.logger.debug "Calling API: OriginsOfLeadsApi.get_origins_of_leads ..." 38 | end 39 | # resource path 40 | local_var_path = "/v2/origins_of_leads".sub('{format}','json') 41 | 42 | # query parameters 43 | query_params = {} 44 | 45 | # header parameters 46 | header_params = {} 47 | # HTTP header 'Accept' (if needed) 48 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 49 | # HTTP header 'Content-Type' 50 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 51 | 52 | # form parameters 53 | form_params = {} 54 | 55 | # http body (model) 56 | post_body = nil 57 | auth_names = [] 58 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 59 | :header_params => header_params, 60 | :query_params => query_params, 61 | :form_params => form_params, 62 | :body => post_body, 63 | :auth_names => auth_names, 64 | :return_type => 'GlobalOriginsOfLeads') 65 | if @api_client.config.debugging 66 | @api_client.config.logger.debug "API called: OriginsOfLeadsApi#get_origins_of_leads\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 67 | end 68 | return data, status_code, headers 69 | end 70 | end 71 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/room_contact_types_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | 17 | class RoomContactTypesApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = RoomContactTypesApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Retrieves the list of valid room contact types. 25 | # Returns a list of room contact types, such as Buyer, Seller, and Listing Agent. 26 | # @return [GlobalRoomContactTypes] 27 | def get_room_contact_types() 28 | data, _status_code, _headers = get_room_contact_types_with_http_info() 29 | return data 30 | end 31 | 32 | # Retrieves the list of valid room contact types. 33 | # Returns a list of room contact types, such as Buyer, Seller, and Listing Agent. 34 | # @return [Array<(GlobalRoomContactTypes, Fixnum, Hash)>] GlobalRoomContactTypes data, response status code and response headers 35 | def get_room_contact_types_with_http_info() 36 | if @api_client.config.debugging 37 | @api_client.config.logger.debug "Calling API: RoomContactTypesApi.get_room_contact_types ..." 38 | end 39 | # resource path 40 | local_var_path = "/v2/room_contact_types".sub('{format}','json') 41 | 42 | # query parameters 43 | query_params = {} 44 | 45 | # header parameters 46 | header_params = {} 47 | # HTTP header 'Accept' (if needed) 48 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 49 | # HTTP header 'Content-Type' 50 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 51 | 52 | # form parameters 53 | form_params = {} 54 | 55 | # http body (model) 56 | post_body = nil 57 | auth_names = [] 58 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 59 | :header_params => header_params, 60 | :query_params => query_params, 61 | :form_params => form_params, 62 | :body => post_body, 63 | :auth_names => auth_names, 64 | :return_type => 'GlobalRoomContactTypes') 65 | if @api_client.config.debugging 66 | @api_client.config.logger.debug "API called: RoomContactTypesApi#get_room_contact_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 67 | end 68 | return data, status_code, headers 69 | end 70 | end 71 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/task_date_types_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | 17 | class TaskDateTypesApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = TaskDateTypesApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Retrieves the list of valid task date types. 25 | # Returns a list of date types that you can use with tasks, such as `Actual Close Date` and `Task Due Date` 26 | # @return [GlobalTaskDateTypes] 27 | def get_task_date_types() 28 | data, _status_code, _headers = get_task_date_types_with_http_info() 29 | return data 30 | end 31 | 32 | # Retrieves the list of valid task date types. 33 | # Returns a list of date types that you can use with tasks, such as `Actual Close Date` and `Task Due Date` 34 | # @return [Array<(GlobalTaskDateTypes, Fixnum, Hash)>] GlobalTaskDateTypes data, response status code and response headers 35 | def get_task_date_types_with_http_info() 36 | if @api_client.config.debugging 37 | @api_client.config.logger.debug "Calling API: TaskDateTypesApi.get_task_date_types ..." 38 | end 39 | # resource path 40 | local_var_path = "/v2/task_date_types".sub('{format}','json') 41 | 42 | # query parameters 43 | query_params = {} 44 | 45 | # header parameters 46 | header_params = {} 47 | # HTTP header 'Accept' (if needed) 48 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 49 | # HTTP header 'Content-Type' 50 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 51 | 52 | # form parameters 53 | form_params = {} 54 | 55 | # http body (model) 56 | post_body = nil 57 | auth_names = [] 58 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 59 | :header_params => header_params, 60 | :query_params => query_params, 61 | :form_params => form_params, 62 | :body => post_body, 63 | :auth_names => auth_names, 64 | :return_type => 'GlobalTaskDateTypes') 65 | if @api_client.config.debugging 66 | @api_client.config.logger.debug "API called: TaskDateTypesApi#get_task_date_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 67 | end 68 | return data, status_code, headers 69 | end 70 | end 71 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/special_circumstance_types_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | 17 | class SpecialCircumstanceTypesApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = SpecialCircumstanceTypesApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Retrieves the list of valid special circumstance types. 25 | # Returns a list of special circumstance types 26 | # @return [GlobalSpecialCircumstanceTypes] 27 | def get_special_circumstance_types() 28 | data, _status_code, _headers = get_special_circumstance_types_with_http_info() 29 | return data 30 | end 31 | 32 | # Retrieves the list of valid special circumstance types. 33 | # Returns a list of special circumstance types 34 | # @return [Array<(GlobalSpecialCircumstanceTypes, Fixnum, Hash)>] GlobalSpecialCircumstanceTypes data, response status code and response headers 35 | def get_special_circumstance_types_with_http_info() 36 | if @api_client.config.debugging 37 | @api_client.config.logger.debug "Calling API: SpecialCircumstanceTypesApi.get_special_circumstance_types ..." 38 | end 39 | # resource path 40 | local_var_path = "/v2/special_circumstance_types".sub('{format}','json') 41 | 42 | # query parameters 43 | query_params = {} 44 | 45 | # header parameters 46 | header_params = {} 47 | # HTTP header 'Accept' (if needed) 48 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 49 | # HTTP header 'Content-Type' 50 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 51 | 52 | # form parameters 53 | form_params = {} 54 | 55 | # http body (model) 56 | post_body = nil 57 | auth_names = [] 58 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 59 | :header_params => header_params, 60 | :query_params => query_params, 61 | :form_params => form_params, 62 | :body => post_body, 63 | :auth_names => auth_names, 64 | :return_type => 'GlobalSpecialCircumstanceTypes') 65 | if @api_client.config.debugging 66 | @api_client.config.logger.debug "API called: SpecialCircumstanceTypesApi#get_special_circumstance_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 67 | end 68 | return data, status_code, headers 69 | end 70 | end 71 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/task_responsibility_types_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | 17 | class TaskResponsibilityTypesApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = TaskResponsibilityTypesApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Retrieves the list of valid task responsibility types. 25 | # Returns a list of responsibility types that you can assign to users when you add them to a task. 26 | # @return [GlobalTaskResponsibilityTypes] 27 | def get_task_responsibility_types() 28 | data, _status_code, _headers = get_task_responsibility_types_with_http_info() 29 | return data 30 | end 31 | 32 | # Retrieves the list of valid task responsibility types. 33 | # Returns a list of responsibility types that you can assign to users when you add them to a task. 34 | # @return [Array<(GlobalTaskResponsibilityTypes, Fixnum, Hash)>] GlobalTaskResponsibilityTypes data, response status code and response headers 35 | def get_task_responsibility_types_with_http_info() 36 | if @api_client.config.debugging 37 | @api_client.config.logger.debug "Calling API: TaskResponsibilityTypesApi.get_task_responsibility_types ..." 38 | end 39 | # resource path 40 | local_var_path = "/v2/task_responsibility_types".sub('{format}','json') 41 | 42 | # query parameters 43 | query_params = {} 44 | 45 | # header parameters 46 | header_params = {} 47 | # HTTP header 'Accept' (if needed) 48 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 49 | # HTTP header 'Content-Type' 50 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 51 | 52 | # form parameters 53 | form_params = {} 54 | 55 | # http body (model) 56 | post_body = nil 57 | auth_names = [] 58 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 59 | :header_params => header_params, 60 | :query_params => query_params, 61 | :form_params => form_params, 62 | :body => post_body, 63 | :auth_names => auth_names, 64 | :return_type => 'GlobalTaskResponsibilityTypes') 65 | if @api_client.config.debugging 66 | @api_client.config.logger.debug "API called: TaskResponsibilityTypesApi#get_task_responsibility_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 67 | end 68 | return data, status_code, headers 69 | end 70 | end 71 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/accounts_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | 17 | class AccountsApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = AccountsApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Get information about the account. 25 | # Returns details about a company account. 26 | # @param account_id (Required) The globally unique identifier (GUID) for the account. 27 | # @return [AccountSummary] 28 | def get_account_information(account_id) 29 | data, _status_code, _headers = get_account_information_with_http_info(account_id) 30 | return data 31 | end 32 | 33 | # Get information about the account. 34 | # Returns details about a company account. 35 | # @param account_id (Required) The globally unique identifier (GUID) for the account. 36 | # @return [Array<(AccountSummary, Fixnum, Hash)>] AccountSummary data, response status code and response headers 37 | def get_account_information_with_http_info(account_id) 38 | if @api_client.config.debugging 39 | @api_client.config.logger.debug "Calling API: AccountsApi.get_account_information ..." 40 | end 41 | # verify the required parameter 'account_id' is set 42 | fail ArgumentError, "Missing the required parameter 'account_id' when calling AccountsApi.get_account_information" if account_id.nil? 43 | # resource path 44 | local_var_path = "/v2/accounts/{accountId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s) 45 | 46 | # query parameters 47 | query_params = {} 48 | 49 | # header parameters 50 | header_params = {} 51 | # HTTP header 'Accept' (if needed) 52 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 53 | # HTTP header 'Content-Type' 54 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 55 | 56 | # form parameters 57 | form_params = {} 58 | 59 | # http body (model) 60 | post_body = nil 61 | auth_names = [] 62 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 63 | :header_params => header_params, 64 | :query_params => query_params, 65 | :form_params => form_params, 66 | :body => post_body, 67 | :auth_names => auth_names, 68 | :return_type => 'AccountSummary') 69 | if @api_client.config.debugging 70 | @api_client.config.logger.debug "API called: AccountsApi#get_account_information\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 71 | end 72 | return data, status_code, headers 73 | end 74 | end 75 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/form_details_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | 17 | class FormDetailsApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = FormDetailsApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Gets form based on Id. 25 | # Returns details about a specific form, such as the date it was created and last updated, the number of pages, the form owner, and other information. 26 | # @param form_id Form ID 27 | # @param account_id (Required) The globally unique identifier (GUID) for the account. 28 | # @return [FormDetails] 29 | def get_form_details(form_id, account_id) 30 | data, _status_code, _headers = get_form_details_with_http_info(form_id, account_id) 31 | return data 32 | end 33 | 34 | # Gets form based on Id. 35 | # Returns details about a specific form, such as the date it was created and last updated, the number of pages, the form owner, and other information. 36 | # @param form_id Form ID 37 | # @param account_id (Required) The globally unique identifier (GUID) for the account. 38 | # @return [Array<(FormDetails, Fixnum, Hash)>] FormDetails data, response status code and response headers 39 | def get_form_details_with_http_info(form_id, account_id) 40 | if @api_client.config.debugging 41 | @api_client.config.logger.debug "Calling API: FormDetailsApi.get_form_details ..." 42 | end 43 | # verify the required parameter 'form_id' is set 44 | fail ArgumentError, "Missing the required parameter 'form_id' when calling FormDetailsApi.get_form_details" if form_id.nil? 45 | # verify the required parameter 'account_id' is set 46 | fail ArgumentError, "Missing the required parameter 'account_id' when calling FormDetailsApi.get_form_details" if account_id.nil? 47 | # resource path 48 | local_var_path = "/v2/accounts/{accountId}/forms/{formId}/details".sub('{format}','json').sub('{' + 'formId' + '}', form_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s) 49 | 50 | # query parameters 51 | query_params = {} 52 | 53 | # header parameters 54 | header_params = {} 55 | # HTTP header 'Accept' (if needed) 56 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 57 | # HTTP header 'Content-Type' 58 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 59 | 60 | # form parameters 61 | form_params = {} 62 | 63 | # http body (model) 64 | post_body = nil 65 | auth_names = [] 66 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 67 | :header_params => header_params, 68 | :query_params => query_params, 69 | :form_params => form_params, 70 | :body => post_body, 71 | :auth_names => auth_names, 72 | :return_type => 'FormDetails') 73 | if @api_client.config.debugging 74 | @api_client.config.logger.debug "API called: FormDetailsApi#get_form_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 75 | end 76 | return data, status_code, headers 77 | end 78 | end 79 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/room_envelopes_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | 17 | class RoomEnvelopesApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = RoomEnvelopesApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Creates an envelope with given documents. Returns the eSign envelope ID created 25 | # Creates an envelope with given documents. Returns the eSign envelope ID created 26 | # @param room_id Room ID 27 | # @param account_id (Required) The globally unique identifier (GUID) for the account. 28 | # @param body Envelope Name and list of document IDs (optional parameter) 29 | # @return [Envelope] 30 | def create_room_envelope(room_id, account_id, body) 31 | data, _status_code, _headers = create_room_envelope_with_http_info(room_id, account_id, body) 32 | return data 33 | end 34 | 35 | # Creates an envelope with given documents. Returns the eSign envelope ID created 36 | # Creates an envelope with given documents. Returns the eSign envelope ID created 37 | # @param room_id Room ID 38 | # @param account_id (Required) The globally unique identifier (GUID) for the account. 39 | # @param body Envelope Name and list of document IDs (optional parameter) 40 | # @return [Array<(Envelope, Fixnum, Hash)>] Envelope data, response status code and response headers 41 | def create_room_envelope_with_http_info(room_id, account_id, body) 42 | if @api_client.config.debugging 43 | @api_client.config.logger.debug "Calling API: RoomEnvelopesApi.create_room_envelope ..." 44 | end 45 | # verify the required parameter 'room_id' is set 46 | fail ArgumentError, "Missing the required parameter 'room_id' when calling RoomEnvelopesApi.create_room_envelope" if room_id.nil? 47 | # verify the required parameter 'account_id' is set 48 | fail ArgumentError, "Missing the required parameter 'account_id' when calling RoomEnvelopesApi.create_room_envelope" if account_id.nil? 49 | # resource path 50 | local_var_path = "/v2/accounts/{accountId}/rooms/{roomId}/envelopes".sub('{format}','json').sub('{' + 'roomId' + '}', room_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s) 51 | 52 | # query parameters 53 | query_params = {} 54 | 55 | # header parameters 56 | header_params = {} 57 | # HTTP header 'Accept' (if needed) 58 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 59 | # HTTP header 'Content-Type' 60 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 61 | 62 | # form parameters 63 | form_params = {} 64 | 65 | # http body (model) 66 | post_body = @api_client.object_to_http_body(body) 67 | auth_names = [] 68 | data, status_code, headers = @api_client.call_api(:POST, local_var_path, 69 | :header_params => header_params, 70 | :query_params => query_params, 71 | :form_params => form_params, 72 | :body => post_body, 73 | :auth_names => auth_names, 74 | :return_type => 'Envelope') 75 | if @api_client.config.debugging 76 | @api_client.config.logger.debug "API called: RoomEnvelopesApi#create_room_envelope\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 77 | end 78 | return data, status_code, headers 79 | end 80 | end 81 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/e_sign_permission_profiles_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | 17 | class ESignPermissionProfilesApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = ESignPermissionProfilesApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Gets permission profiles from the associated eSign account. 25 | # When you create or invite a new member in Rooms, the system creates an eSignature account for the member at the same time. This method returns a list of the eSignature permission profiles that the current user may be able to assign to a new member. The current user may not assign a permission higher than their own permission. 26 | # @param account_id (Required) The globally unique identifier (GUID) for the account. 27 | # @return [ESignPermissionProfileList] 28 | def get_e_sign_permission_profiles(account_id) 29 | data, _status_code, _headers = get_e_sign_permission_profiles_with_http_info(account_id) 30 | return data 31 | end 32 | 33 | # Gets permission profiles from the associated eSign account. 34 | # When you create or invite a new member in Rooms, the system creates an eSignature account for the member at the same time. This method returns a list of the eSignature permission profiles that the current user may be able to assign to a new member. The current user may not assign a permission higher than their own permission. 35 | # @param account_id (Required) The globally unique identifier (GUID) for the account. 36 | # @return [Array<(ESignPermissionProfileList, Fixnum, Hash)>] ESignPermissionProfileList data, response status code and response headers 37 | def get_e_sign_permission_profiles_with_http_info(account_id) 38 | if @api_client.config.debugging 39 | @api_client.config.logger.debug "Calling API: ESignPermissionProfilesApi.get_e_sign_permission_profiles ..." 40 | end 41 | # verify the required parameter 'account_id' is set 42 | fail ArgumentError, "Missing the required parameter 'account_id' when calling ESignPermissionProfilesApi.get_e_sign_permission_profiles" if account_id.nil? 43 | # resource path 44 | local_var_path = "/v2/accounts/{accountId}/esign_permission_profiles".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s) 45 | 46 | # query parameters 47 | query_params = {} 48 | 49 | # header parameters 50 | header_params = {} 51 | # HTTP header 'Accept' (if needed) 52 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 53 | # HTTP header 'Content-Type' 54 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 55 | 56 | # form parameters 57 | form_params = {} 58 | 59 | # http body (model) 60 | post_body = nil 61 | auth_names = [] 62 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 63 | :header_params => header_params, 64 | :query_params => query_params, 65 | :form_params => form_params, 66 | :body => post_body, 67 | :auth_names => auth_names, 68 | :return_type => 'ESignPermissionProfileList') 69 | if @api_client.config.debugging 70 | @api_client.config.logger.debug "API called: ESignPermissionProfilesApi#get_e_sign_permission_profiles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 71 | end 72 | return data, status_code, headers 73 | end 74 | end 75 | end -------------------------------------------------------------------------------- /tests/spec/unit_tests_using_jwt_spec.rb: -------------------------------------------------------------------------------- 1 | require 'docusign_rooms' 2 | require 'base64' 3 | require 'uri' 4 | 5 | describe 'DocuSign Ruby Client Tests' do 6 | def login 7 | begin 8 | if $api_client.nil? 9 | configuration = DocuSign_Rooms::Configuration.new 10 | configuration.host = $host 11 | 12 | $api_client = DocuSign_Rooms::ApiClient.new(configuration) 13 | $api_client.set_oauth_base_path(DocuSign_Rooms::OAuth::DEMO_OAUTH_BASE_PATH) 14 | 15 | # $api_client.get_authorization_uri($integrator_key,'signature',$return_url,'code') 16 | # $api_client.request_jwt_application_token($integrator_key,File.read($private_key_filename),$expires_in_seconds,'' ) 17 | # code = 'code_here' 18 | # $api_client.generate_access_token($integrator_key,$secret,code) 19 | end 20 | 21 | decode_base64_content = Base64.decode64(ENV["PRIVATE_KEY"]) 22 | File.open($private_key_filename, "wb") do |f| 23 | f.write(decode_base64_content) 24 | end 25 | token_obj = $api_client.request_jwt_user_token(ENV["INTEGRATOR_KEY_JWT"],ENV["USER_ID"], File.read($private_key_filename),$expires_in_seconds,$scopes) 26 | user_info = $api_client.get_user_info(token_obj.access_token) 27 | 28 | if !user_info.nil? 29 | user_info.accounts.each do |account| 30 | if account.is_default == "true" 31 | $base_uri = account.base_uri 32 | $account_id = account.account_id 33 | 34 | # IMPORTANT: Use the base url from the login account to instantiant the api_client 35 | base_uri = URI.parse($base_uri) 36 | # $api_client.set_base_path( "%s://%s/restapi" % [base_uri.scheme, base_uri.host]) 37 | 38 | return account 39 | end 40 | end 41 | end 42 | rescue => e 43 | puts "Error during processing: #{$!}" 44 | # puts "Backtrace:\n\t#{e.backtrace.join("\n\t")}" 45 | end 46 | 47 | return nil 48 | end 49 | 50 | def create_api_client 51 | if $api_client.nil? 52 | self.login() 53 | end 54 | 55 | return $api_client 56 | end 57 | 58 | before(:all) do 59 | # run before each test 60 | $host = "https://demo.rooms.docusign.com/restapi" 61 | 62 | $expires_in_seconds = 3600 #1 hour 63 | $auth_server = 'account-d.docusign.com' 64 | $private_key_filename = '../docs/private.pem' 65 | 66 | $recipient_name = "Ruby SDK" 67 | 68 | # Required for embedded signing url 69 | $client_user_id = '1234' 70 | $return_url = 'https://developers.docusign.com/' 71 | $authentication_method = 'email' 72 | 73 | $template_id = '' 74 | $envelope_id = nil 75 | 76 | $base_uri = nil 77 | $account_id = nil 78 | $api_client = nil 79 | 80 | $scopes = ["dtr.company.write", "dtr.company.read", "dtr.rooms.write", "dtr.rooms.read", "signature", "impersonation"] 81 | end 82 | 83 | after do 84 | # run after each test 85 | end 86 | 87 | describe DocuSign_Rooms::OAuth do 88 | describe '.login' do 89 | context 'given correct credentials' do 90 | it 'return Account' do 91 | account = login() 92 | 93 | if !account.nil? 94 | $base_uri = account.base_uri 95 | $account_id = account.account_id 96 | end 97 | 98 | expect($account_id).to be_truthy 99 | expect($base_uri).to be_truthy 100 | end 101 | end 102 | end 103 | end 104 | 105 | describe DocuSign_Rooms::RoomsApi do 106 | describe '.get' do 107 | context 'rooms' do 108 | it 'successfully returns rooms' do 109 | api_client = create_api_client() 110 | rooms_api = DocuSign_Rooms::RoomsApi.new(api_client) 111 | 112 | options = DocuSign_Rooms::GetRoomsOptions.new 113 | 114 | # account_id, options = DocuSign_Rooms::GetRoomsOptions.default 115 | room_summary_list = rooms_api.get_rooms($account_id, options) 116 | 117 | expect(room_summary_list).to be_truthy 118 | if(!room_summary_list.nil?) 119 | expect(room_summary_list.result_set_size > 0).to be_truthy 120 | end 121 | end 122 | end 123 | end 124 | end 125 | end -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # The Official DocuSign Ruby Client 2 | 3 | [![RubyGems version][rubygems-image]][rubygems-url] 4 | [![RubyGems downloads][downloads-image]][downloads-url] 5 | [![Build status][travis-image]][travis-url] 6 | 7 | ## Requirements 8 | 9 | - Ruby 1.9+ 10 | - Free [Developer Sandbox](https://go.docusign.com/sandbox/productshot/?elqCampaignId=16531) 11 | 12 | ## Compatibility 13 | 14 | - Ruby 1.9+ 15 | 16 | ## Note 17 | 18 | This open-source SDK is provided for cases where you would like to make additional changes that the SDK does not provide out-of-the-box. If you simply want to use the SDK with any of the examples shown in the [Developer Center](https://developers.docusign.com/esign-rest-api/code-examples), follow the installation instructions below. 19 | 20 | ## Installation 21 | 22 | ### Install via your application's **Gemfile**: 23 | 24 | 1. In your application's **Gemfile**, add: 25 | **gem 'docusign_rooms'** 26 | 2. Open your preferred console. 27 | 3. In your project directory, execute the installer by typing: 28 | **bundle install** 29 | 30 | ### Manual install: 31 | 32 | 1. Open your preferred console. 33 | 2. In the console, type: 34 | **gem install docusign_rooms** 35 | 36 | ### Dependencies 37 | 38 | This client has the following external dependencies: 39 | 40 | - Jwt>=1.5.2 41 | - Json>=2.1.0 42 | - Typhoeus>=1.0.1 43 | 44 | ## Code Examples 45 | 46 | ### Launchers 47 | 48 | DocuSign provides a sample application code referred to as a [Launcher](https://github.com/docusign/code-examples-ruby). The Launcher contains a set of 31 common use cases and associated source files. These examples use either DocuSign's [Authorization Code Grant](https://developers.docusign.com/esign-rest-api/guides/authentication/oauth2-code-grant) or [JSON Web Tokens (JWT)](https://developers.docusign.com/esign-rest-api/guides/authentication/oauth2-jsonwebtoken) flows. 49 | 50 | ### Proof-of-concept applications 51 | 52 | If your goal is to create a proof-of-concept application, DocuSign provides a set of [Quick Start](https://github.com/docusign/qs-ruby) examples. The Quick Start examples are meant to be used with DocuSign's [OAuth Token Generator](https://developers.docusign.com/oauth-token-generator), which will allow you to generate tokens for the Demo/Sandbox environment only. These tokens last for eight hours and will enable you to build your proof-of-concept application without the need to fully implement an OAuth solution. 53 | 54 | ## OAuth Implementations 55 | 56 | For details regarding which type of OAuth grant will work best for your DocuSign integration, see the [REST API Authentication Overview](https://developers.docusign.com/esign-rest-api/guides/authentication) guide located on the [DocuSign Developer Center](https://developers.docusign.com/esign-rest-api/guides/authentication). 57 | 58 | For security purposes, DocuSign recommends using the [Authorization Code Grant](https://developers.docusign.com/esign-rest-api/guides/authentication/oauth2-code-grant) flow. 59 | 60 | 61 | ## Support 62 | 63 | Log issues against this client through GitHub. We also have an [active developer community on Stack Overflow](https://stackoverflow.com/questions/tagged/docusignapi). 64 | 65 | ## License 66 | 67 | The DocuSign Ruby Client is licensed under the [MIT License](https://github.com/docusign/docusign-ruby-client/blob/master/LICENSE). 68 | 69 | [rubygems-image]: https://img.shields.io/gem/v/docusign_rooms.svg?style=flat 70 | [rubygems-url]: https://rubygems.org/gems/docusign_rooms 71 | [downloads-image]: https://img.shields.io/gem/dt/docusign_rooms.svg?style=flat 72 | [downloads-url]: https://rubygems.org/gems/docusign_rooms 73 | [travis-image]: https://img.shields.io/travis/docusign/docusign-ruby-client.svg?style=flat 74 | [travis-url]: https://travis-ci.org/docusign/docusign-ruby-client 75 | 76 | ### Additional Resources 77 | * [DocuSign Developer Center](https://developers.docusign.com) 78 | * [DocuSign API on Twitter](https://twitter.com/docusignapi) 79 | * [DocuSign For Developers on LinkedIn](https://www.linkedin.com/showcase/docusign-for-developers/) 80 | * [DocuSign For Developers on YouTube](https://www.youtube.com/channel/UCJSJ2kMs_qeQotmw4-lX2NQ) -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- 1 | # This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license) 2 | # Automatically generated by Swagger Codegen (https://github.com/swagger-api/swagger-codegen) 3 | AllCops: 4 | TargetRubyVersion: 2.6 5 | # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop 6 | # to ignore them, so only the ones explicitly set in this file are enabled. 7 | DisabledByDefault: true 8 | Exclude: 9 | - '**/templates/**/*' 10 | - '**/vendor/**/*' 11 | - 'actionpack/lib/action_dispatch/journey/parser.rb' 12 | 13 | # Prefer &&/|| over and/or. 14 | Style/AndOr: 15 | Enabled: true 16 | 17 | # Align `when` with `case`. 18 | Layout/CaseIndentation: 19 | Enabled: true 20 | 21 | # Align comments with method definitions. 22 | Layout/CommentIndentation: 23 | Enabled: true 24 | 25 | Layout/ElseAlignment: 26 | Enabled: true 27 | 28 | Layout/EmptyLineAfterMagicComment: 29 | Enabled: true 30 | 31 | # In a regular class definition, no empty lines around the body. 32 | Layout/EmptyLinesAroundClassBody: 33 | Enabled: true 34 | 35 | # In a regular method definition, no empty lines around the body. 36 | Layout/EmptyLinesAroundMethodBody: 37 | Enabled: true 38 | 39 | # In a regular module definition, no empty lines around the body. 40 | Layout/EmptyLinesAroundModuleBody: 41 | Enabled: true 42 | 43 | Layout/FirstParameterIndentation: 44 | Enabled: true 45 | 46 | # Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }. 47 | Style/HashSyntax: 48 | Enabled: false 49 | 50 | # Method definitions after `private` or `protected` isolated calls need one 51 | # extra level of indentation. 52 | Layout/IndentationConsistency: 53 | Enabled: true 54 | EnforcedStyle: indented_internal_methods 55 | 56 | # Two spaces, no tabs (for indentation). 57 | Layout/IndentationWidth: 58 | Enabled: true 59 | 60 | Layout/LeadingCommentSpace: 61 | Enabled: true 62 | 63 | Layout/SpaceAfterColon: 64 | Enabled: true 65 | 66 | Layout/SpaceAfterComma: 67 | Enabled: true 68 | 69 | Layout/SpaceAroundEqualsInParameterDefault: 70 | Enabled: true 71 | 72 | Layout/SpaceAroundKeyword: 73 | Enabled: true 74 | 75 | Layout/SpaceAroundOperators: 76 | Enabled: true 77 | 78 | Layout/SpaceBeforeComma: 79 | Enabled: true 80 | 81 | Layout/SpaceBeforeFirstArg: 82 | Enabled: true 83 | 84 | Style/DefWithParentheses: 85 | Enabled: true 86 | 87 | # Defining a method with parameters needs parentheses. 88 | Style/MethodDefParentheses: 89 | Enabled: true 90 | 91 | Style/FrozenStringLiteralComment: 92 | Enabled: false 93 | EnforcedStyle: always 94 | 95 | # Use `foo {}` not `foo{}`. 96 | Layout/SpaceBeforeBlockBraces: 97 | Enabled: true 98 | 99 | # Use `foo { bar }` not `foo {bar}`. 100 | Layout/SpaceInsideBlockBraces: 101 | Enabled: true 102 | 103 | # Use `{ a: 1 }` not `{a:1}`. 104 | Layout/SpaceInsideHashLiteralBraces: 105 | Enabled: true 106 | 107 | Layout/SpaceInsideParens: 108 | Enabled: true 109 | 110 | # Check quotes usage according to lint rule below. 111 | #Style/StringLiterals: 112 | # Enabled: true 113 | # EnforcedStyle: single_quotes 114 | 115 | # Detect hard tabs, no hard tabs. 116 | Layout/IndentationStyle: 117 | Enabled: true 118 | 119 | # Blank lines should not have any spaces. 120 | Layout/TrailingEmptyLines: 121 | Enabled: true 122 | 123 | # No trailing whitespace. 124 | Layout/TrailingWhitespace: 125 | Enabled: false 126 | 127 | # Use quotes for string literals when they are enough. 128 | Style/RedundantPercentQ: 129 | Enabled: true 130 | 131 | # Align `end` with the matching keyword or starting expression except for 132 | # assignments, where it should be aligned with the LHS. 133 | Lint/EndAlignment: 134 | Enabled: true 135 | EnforcedStyleAlignWith: variable 136 | AutoCorrect: true 137 | 138 | # Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg. 139 | Lint/RequireParentheses: 140 | Enabled: true 141 | 142 | Style/RedundantReturn: 143 | Enabled: true 144 | AllowMultipleReturnValues: true 145 | 146 | Style/Semicolon: 147 | Enabled: true 148 | AllowAsExpressionSeparator: true 149 | -------------------------------------------------------------------------------- /lib/docusign_rooms/api/task_list_templates_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | class GetTaskListTemplatesOptions 17 | # The starting zero-based index position from which to start returning values. The default is `0`. 18 | attr_accessor :start_position 19 | 20 | # The number of results to return. This value must be a number between `1` and `100` (default). 21 | attr_accessor :count 22 | 23 | def self.default 24 | @@default ||= GetTaskListTemplatesOptions.new 25 | end 26 | end 27 | 28 | 29 | class TaskListTemplatesApi 30 | attr_accessor :api_client 31 | 32 | def initialize(api_client = TaskListTemplatesApi.default) 33 | @api_client = api_client 34 | end 35 | 36 | # Returns all task list templates for the company of the active user. 37 | # Returns all task list templates for the company of the active user. 38 | # @param account_id (Required) The globally unique identifier (GUID) for the account. 39 | # @param DocuSign_Rooms::GetTaskListTemplatesOptions Options for modifying the behavior of the function. 40 | # @return [TaskListTemplateList] 41 | def get_task_list_templates(account_id, options = DocuSign_Rooms::GetTaskListTemplatesOptions.default) 42 | data, _status_code, _headers = get_task_list_templates_with_http_info(account_id, options) 43 | return data 44 | end 45 | 46 | # Returns all task list templates for the company of the active user. 47 | # Returns all task list templates for the company of the active user. 48 | # @param account_id (Required) The globally unique identifier (GUID) for the account. 49 | # @param DocuSign_Rooms::GetTaskListTemplatesOptions Options for modifying the behavior of the function. 50 | # @return [Array<(TaskListTemplateList, Fixnum, Hash)>] TaskListTemplateList data, response status code and response headers 51 | def get_task_list_templates_with_http_info(account_id, options = DocuSign_Rooms::GetTaskListTemplatesOptions.default) 52 | if @api_client.config.debugging 53 | @api_client.config.logger.debug "Calling API: TaskListTemplatesApi.get_task_list_templates ..." 54 | end 55 | # verify the required parameter 'account_id' is set 56 | fail ArgumentError, "Missing the required parameter 'account_id' when calling TaskListTemplatesApi.get_task_list_templates" if account_id.nil? 57 | # resource path 58 | local_var_path = "/v2/accounts/{accountId}/task_list_templates".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s) 59 | 60 | # query parameters 61 | query_params = {} 62 | query_params[:'startPosition'] = options.start_position if !options.start_position.nil? 63 | query_params[:'count'] = options.count if !options.count.nil? 64 | 65 | # header parameters 66 | header_params = {} 67 | # HTTP header 'Accept' (if needed) 68 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 69 | # HTTP header 'Content-Type' 70 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 71 | 72 | # form parameters 73 | form_params = {} 74 | 75 | # http body (model) 76 | post_body = nil 77 | auth_names = [] 78 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 79 | :header_params => header_params, 80 | :query_params => query_params, 81 | :form_params => form_params, 82 | :body => post_body, 83 | :auth_names => auth_names, 84 | :return_type => 'TaskListTemplateList') 85 | if @api_client.config.debugging 86 | @api_client.config.logger.debug "API called: TaskListTemplatesApi#get_task_list_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 87 | end 88 | return data, status_code, headers 89 | end 90 | end 91 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/external_form_fill_sessions_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | 17 | class ExternalFormFillSessionsApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = ExternalFormFillSessionsApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Creates an external form fill session. 25 | # Returns a URL for a new external form fill session, based on the `roomId` and `formId` or `formIds` that you specify in the `formFillSessionForCreate` request body. User may supply up to 10 `formIds`. Eventually, `formId` will be deprecated. 26 | # @param account_id (Required) The globally unique identifier (GUID) for the account. 27 | # @param body Request body that accepts the `roomId` and `formId` or `formIds` that you specify in the `formFillSessionForCreate` request body. User may supply up to 10 `formIds`. Eventually, `formId` will be deprecated (optional parameter) 28 | # @return [ExternalFormFillSession] 29 | def create_external_form_fill_session(account_id, body) 30 | data, _status_code, _headers = create_external_form_fill_session_with_http_info(account_id, body) 31 | return data 32 | end 33 | 34 | # Creates an external form fill session. 35 | # Returns a URL for a new external form fill session, based on the `roomId` and `formId` or `formIds` that you specify in the `formFillSessionForCreate` request body. User may supply up to 10 `formIds`. Eventually, `formId` will be deprecated. 36 | # @param account_id (Required) The globally unique identifier (GUID) for the account. 37 | # @param body Request body that accepts the `roomId` and `formId` or `formIds` that you specify in the `formFillSessionForCreate` request body. User may supply up to 10 `formIds`. Eventually, `formId` will be deprecated (optional parameter) 38 | # @return [Array<(ExternalFormFillSession, Fixnum, Hash)>] ExternalFormFillSession data, response status code and response headers 39 | def create_external_form_fill_session_with_http_info(account_id, body) 40 | if @api_client.config.debugging 41 | @api_client.config.logger.debug "Calling API: ExternalFormFillSessionsApi.create_external_form_fill_session ..." 42 | end 43 | # verify the required parameter 'account_id' is set 44 | fail ArgumentError, "Missing the required parameter 'account_id' when calling ExternalFormFillSessionsApi.create_external_form_fill_session" if account_id.nil? 45 | # resource path 46 | local_var_path = "/v2/accounts/{accountId}/external_form_fill_sessions".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s) 47 | 48 | # query parameters 49 | query_params = {} 50 | 51 | # header parameters 52 | header_params = {} 53 | # HTTP header 'Accept' (if needed) 54 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 55 | # HTTP header 'Content-Type' 56 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json', 'application/xml', 'text/xml', 'application/*+xml']) 57 | 58 | # form parameters 59 | form_params = {} 60 | 61 | # http body (model) 62 | post_body = @api_client.object_to_http_body(body) 63 | auth_names = [] 64 | data, status_code, headers = @api_client.call_api(:POST, local_var_path, 65 | :header_params => header_params, 66 | :query_params => query_params, 67 | :form_params => form_params, 68 | :body => post_body, 69 | :auth_names => auth_names, 70 | :return_type => 'ExternalFormFillSession') 71 | if @api_client.config.debugging 72 | @api_client.config.logger.debug "API called: ExternalFormFillSessionsApi#create_external_form_fill_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 73 | end 74 | return data, status_code, headers 75 | end 76 | end 77 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/form_group_forms_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | class GetFormGroupFormsOptions 17 | # Default value is 100 and max value is 100 18 | attr_accessor :count 19 | 20 | # Default value is 0 21 | attr_accessor :start_position 22 | 23 | def self.default 24 | @@default ||= GetFormGroupFormsOptions.new 25 | end 26 | end 27 | 28 | 29 | class FormGroupFormsApi 30 | attr_accessor :api_client 31 | 32 | def initialize(api_client = FormGroupFormsApi.default) 33 | @api_client = api_client 34 | end 35 | 36 | # Gets the user's form group's forms. 37 | # Get forms of the specified form group. 38 | # @param form_group_id The ID of the form group. 39 | # @param account_id (Required) The globally unique identifier (GUID) for the account. 40 | # @param DocuSign_Rooms::GetFormGroupFormsOptions Options for modifying the behavior of the function. 41 | # @return [FormGroupFormList] 42 | def get_form_group_forms(form_group_id, account_id, options = DocuSign_Rooms::GetFormGroupFormsOptions.default) 43 | data, _status_code, _headers = get_form_group_forms_with_http_info(form_group_id, account_id, options) 44 | return data 45 | end 46 | 47 | # Gets the user's form group's forms. 48 | # Get forms of the specified form group. 49 | # @param form_group_id The ID of the form group. 50 | # @param account_id (Required) The globally unique identifier (GUID) for the account. 51 | # @param DocuSign_Rooms::GetFormGroupFormsOptions Options for modifying the behavior of the function. 52 | # @return [Array<(FormGroupFormList, Fixnum, Hash)>] FormGroupFormList data, response status code and response headers 53 | def get_form_group_forms_with_http_info(form_group_id, account_id, options = DocuSign_Rooms::GetFormGroupFormsOptions.default) 54 | if @api_client.config.debugging 55 | @api_client.config.logger.debug "Calling API: FormGroupFormsApi.get_form_group_forms ..." 56 | end 57 | # verify the required parameter 'form_group_id' is set 58 | fail ArgumentError, "Missing the required parameter 'form_group_id' when calling FormGroupFormsApi.get_form_group_forms" if form_group_id.nil? 59 | # verify the required parameter 'account_id' is set 60 | fail ArgumentError, "Missing the required parameter 'account_id' when calling FormGroupFormsApi.get_form_group_forms" if account_id.nil? 61 | # resource path 62 | local_var_path = "/v2/accounts/{accountId}/form_groups/{formGroupId}/forms".sub('{format}','json').sub('{' + 'formGroupId' + '}', form_group_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s) 63 | 64 | # query parameters 65 | query_params = {} 66 | query_params[:'count'] = options.count if !options.count.nil? 67 | query_params[:'startPosition'] = options.start_position if !options.start_position.nil? 68 | 69 | # header parameters 70 | header_params = {} 71 | # HTTP header 'Accept' (if needed) 72 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 73 | # HTTP header 'Content-Type' 74 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 75 | 76 | # form parameters 77 | form_params = {} 78 | 79 | # http body (model) 80 | post_body = nil 81 | auth_names = [] 82 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 83 | :header_params => header_params, 84 | :query_params => query_params, 85 | :form_params => form_params, 86 | :body => post_body, 87 | :auth_names => auth_names, 88 | :return_type => 'FormGroupFormList') 89 | if @api_client.config.debugging 90 | @api_client.config.logger.debug "API called: FormGroupFormsApi#get_form_group_forms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 91 | end 92 | return data, status_code, headers 93 | end 94 | end 95 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/room_folders_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | class GetRoomFoldersOptions 17 | # Position of the first item in the total results. Defaults to 0. 18 | attr_accessor :start_position 19 | 20 | # Number of room folders to return. Defaults to the maximum which is 100. 21 | attr_accessor :count 22 | 23 | def self.default 24 | @@default ||= GetRoomFoldersOptions.new 25 | end 26 | end 27 | 28 | 29 | class RoomFoldersApi 30 | attr_accessor :api_client 31 | 32 | def initialize(api_client = RoomFoldersApi.default) 33 | @api_client = api_client 34 | end 35 | 36 | # Gets room folders accessible to the calling user. 37 | # Gets a list of room folders in the specified room that are accessible to the current user. 38 | # @param room_id The room id from which to retrieve folders. 39 | # @param account_id (Required) The globally unique identifier (GUID) for the account. 40 | # @param DocuSign_Rooms::GetRoomFoldersOptions Options for modifying the behavior of the function. 41 | # @return [RoomFolderList] 42 | def get_room_folders(room_id, account_id, options = DocuSign_Rooms::GetRoomFoldersOptions.default) 43 | data, _status_code, _headers = get_room_folders_with_http_info(room_id, account_id, options) 44 | return data 45 | end 46 | 47 | # Gets room folders accessible to the calling user. 48 | # Gets a list of room folders in the specified room that are accessible to the current user. 49 | # @param room_id The room id from which to retrieve folders. 50 | # @param account_id (Required) The globally unique identifier (GUID) for the account. 51 | # @param DocuSign_Rooms::GetRoomFoldersOptions Options for modifying the behavior of the function. 52 | # @return [Array<(RoomFolderList, Fixnum, Hash)>] RoomFolderList data, response status code and response headers 53 | def get_room_folders_with_http_info(room_id, account_id, options = DocuSign_Rooms::GetRoomFoldersOptions.default) 54 | if @api_client.config.debugging 55 | @api_client.config.logger.debug "Calling API: RoomFoldersApi.get_room_folders ..." 56 | end 57 | # verify the required parameter 'room_id' is set 58 | fail ArgumentError, "Missing the required parameter 'room_id' when calling RoomFoldersApi.get_room_folders" if room_id.nil? 59 | # verify the required parameter 'account_id' is set 60 | fail ArgumentError, "Missing the required parameter 'account_id' when calling RoomFoldersApi.get_room_folders" if account_id.nil? 61 | # resource path 62 | local_var_path = "/v2/accounts/{accountId}/rooms/{roomId}/room_folders".sub('{format}','json').sub('{' + 'roomId' + '}', room_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s) 63 | 64 | # query parameters 65 | query_params = {} 66 | query_params[:'startPosition'] = options.start_position if !options.start_position.nil? 67 | query_params[:'count'] = options.count if !options.count.nil? 68 | 69 | # header parameters 70 | header_params = {} 71 | # HTTP header 'Accept' (if needed) 72 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 73 | # HTTP header 'Content-Type' 74 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 75 | 76 | # form parameters 77 | form_params = {} 78 | 79 | # http body (model) 80 | post_body = nil 81 | auth_names = [] 82 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 83 | :header_params => header_params, 84 | :query_params => query_params, 85 | :form_params => form_params, 86 | :body => post_body, 87 | :auth_names => auth_names, 88 | :return_type => 'RoomFolderList') 89 | if @api_client.config.debugging 90 | @api_client.config.logger.debug "API called: RoomFoldersApi#get_room_folders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 91 | end 92 | return data, status_code, headers 93 | end 94 | end 95 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/fields_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | class GetFieldSetOptions 17 | # A comma-separated list that limits the fields to return:\\n\\n- `IsRequiredOnCreate`: include fields that are required in room creation.\\n- `IsRequiredOnSubmit`: include fields that are required when submitting a room for review.\\n 18 | attr_accessor :fields_custom_data_filters 19 | 20 | def self.default 21 | @@default ||= GetFieldSetOptions.new 22 | end 23 | end 24 | 25 | 26 | class FieldsApi 27 | attr_accessor :api_client 28 | 29 | def initialize(api_client = FieldsApi.default) 30 | @api_client = api_client 31 | end 32 | 33 | # Get details of a specific field set. 34 | # Get details of a specific field set. 35 | # @param field_set_id The id of the field set. 36 | # @param account_id (Required) The globally unique identifier (GUID) for the account. 37 | # @param DocuSign_Rooms::GetFieldSetOptions Options for modifying the behavior of the function. 38 | # @return [FieldSet] 39 | def get_field_set(field_set_id, account_id, options = DocuSign_Rooms::GetFieldSetOptions.default) 40 | data, _status_code, _headers = get_field_set_with_http_info(field_set_id, account_id, options) 41 | return data 42 | end 43 | 44 | # Get details of a specific field set. 45 | # Get details of a specific field set. 46 | # @param field_set_id The id of the field set. 47 | # @param account_id (Required) The globally unique identifier (GUID) for the account. 48 | # @param DocuSign_Rooms::GetFieldSetOptions Options for modifying the behavior of the function. 49 | # @return [Array<(FieldSet, Fixnum, Hash)>] FieldSet data, response status code and response headers 50 | def get_field_set_with_http_info(field_set_id, account_id, options = DocuSign_Rooms::GetFieldSetOptions.default) 51 | if @api_client.config.debugging 52 | @api_client.config.logger.debug "Calling API: FieldsApi.get_field_set ..." 53 | end 54 | # verify the required parameter 'field_set_id' is set 55 | fail ArgumentError, "Missing the required parameter 'field_set_id' when calling FieldsApi.get_field_set" if field_set_id.nil? 56 | # verify the required parameter 'account_id' is set 57 | fail ArgumentError, "Missing the required parameter 'account_id' when calling FieldsApi.get_field_set" if account_id.nil? 58 | if options.fields_custom_data_filters && !options.fields_custom_data_filters.all?{|item| ['None', 'IsRequiredOnCreate', 'IsRequiredOnSubmit'].include?(item)} 59 | fail ArgumentError, 'invalid value for "fields_custom_data_filters", must include one of None, IsRequiredOnCreate, IsRequiredOnSubmit' 60 | end 61 | # resource path 62 | local_var_path = "/v2/accounts/{accountId}/field_sets/{fieldSetId}".sub('{format}','json').sub('{' + 'fieldSetId' + '}', field_set_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s) 63 | 64 | # query parameters 65 | query_params = {} 66 | query_params[:'fieldsCustomDataFilters'] = @api_client.build_collection_param(options.fields_custom_data_filters, :csv) if !options.fields_custom_data_filters.nil? 67 | 68 | # header parameters 69 | header_params = {} 70 | # HTTP header 'Accept' (if needed) 71 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 72 | # HTTP header 'Content-Type' 73 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 74 | 75 | # form parameters 76 | form_params = {} 77 | 78 | # http body (model) 79 | post_body = nil 80 | auth_names = [] 81 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 82 | :header_params => header_params, 83 | :query_params => query_params, 84 | :form_params => form_params, 85 | :body => post_body, 86 | :auth_names => auth_names, 87 | :return_type => 'FieldSet') 88 | if @api_client.config.debugging 89 | @api_client.config.logger.debug "API called: FieldsApi#get_field_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 90 | end 91 | return data, status_code, headers 92 | end 93 | end 94 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/form_provider_associations_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | class GetFormProviderAssociationsOptions 17 | # Total number of associations to be returned 18 | attr_accessor :count 19 | 20 | # starting position of the list 21 | attr_accessor :start_position 22 | 23 | def self.default 24 | @@default ||= GetFormProviderAssociationsOptions.new 25 | end 26 | end 27 | 28 | 29 | class FormProviderAssociationsApi 30 | attr_accessor :api_client 31 | 32 | def initialize(api_client = FormProviderAssociationsApi.default) 33 | @api_client = api_client 34 | end 35 | 36 | # Retrieves all Associations by provider 37 | # Retrieves all Associations for given provider 38 | # @param provider_id provider id like nar, nwmls etc.. 39 | # @param account_id (Required) The globally unique identifier (GUID) for the account. 40 | # @param DocuSign_Rooms::GetFormProviderAssociationsOptions Options for modifying the behavior of the function. 41 | # @return [FormProviderAssociationsSummaryList] 42 | def get_form_provider_associations(provider_id, account_id, options = DocuSign_Rooms::GetFormProviderAssociationsOptions.default) 43 | data, _status_code, _headers = get_form_provider_associations_with_http_info(provider_id, account_id, options) 44 | return data 45 | end 46 | 47 | # Retrieves all Associations by provider 48 | # Retrieves all Associations for given provider 49 | # @param provider_id provider id like nar, nwmls etc.. 50 | # @param account_id (Required) The globally unique identifier (GUID) for the account. 51 | # @param DocuSign_Rooms::GetFormProviderAssociationsOptions Options for modifying the behavior of the function. 52 | # @return [Array<(FormProviderAssociationsSummaryList, Fixnum, Hash)>] FormProviderAssociationsSummaryList data, response status code and response headers 53 | def get_form_provider_associations_with_http_info(provider_id, account_id, options = DocuSign_Rooms::GetFormProviderAssociationsOptions.default) 54 | if @api_client.config.debugging 55 | @api_client.config.logger.debug "Calling API: FormProviderAssociationsApi.get_form_provider_associations ..." 56 | end 57 | # verify the required parameter 'provider_id' is set 58 | fail ArgumentError, "Missing the required parameter 'provider_id' when calling FormProviderAssociationsApi.get_form_provider_associations" if provider_id.nil? 59 | # verify the required parameter 'account_id' is set 60 | fail ArgumentError, "Missing the required parameter 'account_id' when calling FormProviderAssociationsApi.get_form_provider_associations" if account_id.nil? 61 | # resource path 62 | local_var_path = "/v2/accounts/{accountId}/form_providers/{providerId}/associations".sub('{format}','json').sub('{' + 'providerId' + '}', provider_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s) 63 | 64 | # query parameters 65 | query_params = {} 66 | query_params[:'count'] = options.count if !options.count.nil? 67 | query_params[:'startPosition'] = options.start_position if !options.start_position.nil? 68 | 69 | # header parameters 70 | header_params = {} 71 | # HTTP header 'Accept' (if needed) 72 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 73 | # HTTP header 'Content-Type' 74 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 75 | 76 | # form parameters 77 | form_params = {} 78 | 79 | # http body (model) 80 | post_body = nil 81 | auth_names = [] 82 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 83 | :header_params => header_params, 84 | :query_params => query_params, 85 | :form_params => form_params, 86 | :body => post_body, 87 | :auth_names => auth_names, 88 | :return_type => 'FormProviderAssociationsSummaryList') 89 | if @api_client.config.debugging 90 | @api_client.config.logger.debug "API called: FormProviderAssociationsApi#get_form_provider_associations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 91 | end 92 | return data, status_code, headers 93 | end 94 | end 95 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/api/room_templates_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require "uri" 13 | 14 | module DocuSign_Rooms 15 | 16 | class GetRoomTemplatesOptions 17 | # Get all room templates you have access to for this office. Response includes Company and Region level templates. If onlyAssignable is true, and no officeId is provided, user's default office is assumed. 18 | attr_accessor :office_id 19 | 20 | # Get list of templates you have access to. Default value false. 21 | attr_accessor :only_assignable 22 | 23 | # When set to true, only returns room templates that are not disabled. 24 | attr_accessor :only_enabled 25 | 26 | # Number of room templates to return. Defaults to the maximum which is 100. 27 | attr_accessor :count 28 | 29 | # Position of the first item in the total results. Defaults to 0. 30 | attr_accessor :start_position 31 | 32 | def self.default 33 | @@default ||= GetRoomTemplatesOptions.new 34 | end 35 | end 36 | 37 | 38 | class RoomTemplatesApi 39 | attr_accessor :api_client 40 | 41 | def initialize(api_client = RoomTemplatesApi.default) 42 | @api_client = api_client 43 | end 44 | 45 | # Returns all room templates that the active user has access to 46 | # This method returns a list of room templates that the user can use to create a new room. The response includes company and region-level templates 47 | # @param account_id (Required) The globally unique identifier (GUID) for the account. 48 | # @param DocuSign_Rooms::GetRoomTemplatesOptions Options for modifying the behavior of the function. 49 | # @return [RoomTemplatesSummaryList] 50 | def get_room_templates(account_id, options = DocuSign_Rooms::GetRoomTemplatesOptions.default) 51 | data, _status_code, _headers = get_room_templates_with_http_info(account_id, options) 52 | return data 53 | end 54 | 55 | # Returns all room templates that the active user has access to 56 | # This method returns a list of room templates that the user can use to create a new room. The response includes company and region-level templates 57 | # @param account_id (Required) The globally unique identifier (GUID) for the account. 58 | # @param DocuSign_Rooms::GetRoomTemplatesOptions Options for modifying the behavior of the function. 59 | # @return [Array<(RoomTemplatesSummaryList, Fixnum, Hash)>] RoomTemplatesSummaryList data, response status code and response headers 60 | def get_room_templates_with_http_info(account_id, options = DocuSign_Rooms::GetRoomTemplatesOptions.default) 61 | if @api_client.config.debugging 62 | @api_client.config.logger.debug "Calling API: RoomTemplatesApi.get_room_templates ..." 63 | end 64 | # verify the required parameter 'account_id' is set 65 | fail ArgumentError, "Missing the required parameter 'account_id' when calling RoomTemplatesApi.get_room_templates" if account_id.nil? 66 | # resource path 67 | local_var_path = "/v2/accounts/{accountId}/room_templates".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s) 68 | 69 | # query parameters 70 | query_params = {} 71 | query_params[:'officeId'] = options.office_id if !options.office_id.nil? 72 | query_params[:'onlyAssignable'] = options.only_assignable if !options.only_assignable.nil? 73 | query_params[:'onlyEnabled'] = options.only_enabled if !options.only_enabled.nil? 74 | query_params[:'count'] = options.count if !options.count.nil? 75 | query_params[:'startPosition'] = options.start_position if !options.start_position.nil? 76 | 77 | # header parameters 78 | header_params = {} 79 | # HTTP header 'Accept' (if needed) 80 | header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml']) 81 | # HTTP header 'Content-Type' 82 | header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) 83 | 84 | # form parameters 85 | form_params = {} 86 | 87 | # http body (model) 88 | post_body = nil 89 | auth_names = [] 90 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 91 | :header_params => header_params, 92 | :query_params => query_params, 93 | :form_params => form_params, 94 | :body => post_body, 95 | :auth_names => auth_names, 96 | :return_type => 'RoomTemplatesSummaryList') 97 | if @api_client.config.debugging 98 | @api_client.config.logger.debug "API called: RoomTemplatesApi#get_room_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 99 | end 100 | return data, status_code, headers 101 | end 102 | end 103 | end -------------------------------------------------------------------------------- /lib/docusign_rooms/models/room_picture.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class RoomPicture 16 | attr_accessor :url 17 | 18 | # Attribute mapping from ruby-style variable name to JSON key. 19 | def self.attribute_map 20 | { 21 | :'url' => :'url' 22 | } 23 | end 24 | 25 | # Attribute type mapping. 26 | def self.swagger_types 27 | { 28 | :'url' => :'String' 29 | } 30 | end 31 | 32 | # Initializes the object 33 | # @param [Hash] attributes Model attributes in the form of hash 34 | def initialize(attributes = {}) 35 | return unless attributes.is_a?(Hash) 36 | 37 | # convert string to symbol for hash key 38 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 39 | 40 | if attributes.has_key?(:'url') 41 | self.url = attributes[:'url'] 42 | end 43 | end 44 | 45 | # Show invalid properties with the reasons. Usually used together with valid? 46 | # @return Array for valid properties with the reasons 47 | def list_invalid_properties 48 | invalid_properties = Array.new 49 | invalid_properties 50 | end 51 | 52 | # Check to see if the all the properties in the model are valid 53 | # @return true if the model is valid 54 | def valid? 55 | true 56 | end 57 | 58 | # Checks equality by comparing each attribute. 59 | # @param [Object] Object to be compared 60 | def ==(o) 61 | return true if self.equal?(o) 62 | self.class == o.class && 63 | url == o.url 64 | end 65 | 66 | # @see the `==` method 67 | # @param [Object] Object to be compared 68 | def eql?(o) 69 | self == o 70 | end 71 | 72 | # Calculates hash code according to all attributes. 73 | # @return [Fixnum] Hash code 74 | def hash 75 | [url].hash 76 | end 77 | 78 | # Builds the object from hash 79 | # @param [Hash] attributes Model attributes in the form of hash 80 | # @return [Object] Returns the model itself 81 | def build_from_hash(attributes) 82 | return nil unless attributes.is_a?(Hash) 83 | self.class.swagger_types.each_pair do |key, type| 84 | if type =~ /\AArray<(.*)>/i 85 | # check to ensure the input is an array given that the attribute 86 | # is documented as an array but the input is not 87 | if attributes[self.class.attribute_map[key]].is_a?(Array) 88 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 89 | end 90 | elsif !attributes[self.class.attribute_map[key]].nil? 91 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 92 | end # or else data not found in attributes(hash), not an issue as the data can be optional 93 | end 94 | 95 | self 96 | end 97 | 98 | # Deserializes the data based on type 99 | # @param string type Data type 100 | # @param string value Value to be deserialized 101 | # @return [Object] Deserialized data 102 | def _deserialize(type, value) 103 | case type.to_sym 104 | when :DateTime 105 | DateTime.parse(value) 106 | when :Date 107 | Date.parse(value) 108 | when :String 109 | value.to_s 110 | when :Integer 111 | value.to_i 112 | when :Float 113 | value.to_f 114 | when :BOOLEAN 115 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 116 | true 117 | else 118 | false 119 | end 120 | when :Object 121 | # generic object (usually a Hash), return directly 122 | value 123 | when /\AArray<(?.+)>\z/ 124 | inner_type = Regexp.last_match[:inner_type] 125 | value.map { |v| _deserialize(inner_type, v) } 126 | when /\AHash<(?.+?), (?.+)>\z/ 127 | k_type = Regexp.last_match[:k_type] 128 | v_type = Regexp.last_match[:v_type] 129 | {}.tap do |hash| 130 | value.each do |k, v| 131 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 132 | end 133 | end 134 | else # model 135 | temp_model = DocuSign_Rooms.const_get(type).new 136 | temp_model.build_from_hash(value) 137 | end 138 | end 139 | 140 | # Returns the string representation of the object 141 | # @return [String] String presentation of the object 142 | def to_s 143 | to_hash.to_s 144 | end 145 | 146 | # to_body is an alias to to_hash (backward compatibility) 147 | # @return [Hash] Returns the object in the form of hash 148 | def to_body 149 | to_hash 150 | end 151 | 152 | # Returns the object in the form of hash 153 | # @return [Hash] Returns the object in the form of hash 154 | def to_hash 155 | hash = {} 156 | self.class.attribute_map.each_pair do |attr, param| 157 | value = self.send(attr) 158 | next if value.nil? 159 | hash[param] = _to_hash(value) 160 | end 161 | hash 162 | end 163 | 164 | # Outputs non-array value in the form of hash 165 | # For object, use to_hash. Otherwise, just return the value 166 | # @param [Object] value Any valid value 167 | # @return [Hash] Returns the value in the form of hash 168 | def _to_hash(value) 169 | if value.is_a?(Array) 170 | value.compact.map { |v| _to_hash(v) } 171 | elsif value.is_a?(Hash) 172 | {}.tap do |hash| 173 | value.each { |k, v| hash[k] = _to_hash(v) } 174 | end 175 | elsif value.respond_to? :to_hash 176 | value.to_hash 177 | else 178 | value 179 | end 180 | end 181 | 182 | end 183 | end 184 | -------------------------------------------------------------------------------- /lib/docusign_rooms/models/external_form_fill_session.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class ExternalFormFillSession 16 | attr_accessor :url 17 | 18 | # Attribute mapping from ruby-style variable name to JSON key. 19 | def self.attribute_map 20 | { 21 | :'url' => :'url' 22 | } 23 | end 24 | 25 | # Attribute type mapping. 26 | def self.swagger_types 27 | { 28 | :'url' => :'String' 29 | } 30 | end 31 | 32 | # Initializes the object 33 | # @param [Hash] attributes Model attributes in the form of hash 34 | def initialize(attributes = {}) 35 | return unless attributes.is_a?(Hash) 36 | 37 | # convert string to symbol for hash key 38 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 39 | 40 | if attributes.has_key?(:'url') 41 | self.url = attributes[:'url'] 42 | end 43 | end 44 | 45 | # Show invalid properties with the reasons. Usually used together with valid? 46 | # @return Array for valid properties with the reasons 47 | def list_invalid_properties 48 | invalid_properties = Array.new 49 | invalid_properties 50 | end 51 | 52 | # Check to see if the all the properties in the model are valid 53 | # @return true if the model is valid 54 | def valid? 55 | true 56 | end 57 | 58 | # Checks equality by comparing each attribute. 59 | # @param [Object] Object to be compared 60 | def ==(o) 61 | return true if self.equal?(o) 62 | self.class == o.class && 63 | url == o.url 64 | end 65 | 66 | # @see the `==` method 67 | # @param [Object] Object to be compared 68 | def eql?(o) 69 | self == o 70 | end 71 | 72 | # Calculates hash code according to all attributes. 73 | # @return [Fixnum] Hash code 74 | def hash 75 | [url].hash 76 | end 77 | 78 | # Builds the object from hash 79 | # @param [Hash] attributes Model attributes in the form of hash 80 | # @return [Object] Returns the model itself 81 | def build_from_hash(attributes) 82 | return nil unless attributes.is_a?(Hash) 83 | self.class.swagger_types.each_pair do |key, type| 84 | if type =~ /\AArray<(.*)>/i 85 | # check to ensure the input is an array given that the attribute 86 | # is documented as an array but the input is not 87 | if attributes[self.class.attribute_map[key]].is_a?(Array) 88 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 89 | end 90 | elsif !attributes[self.class.attribute_map[key]].nil? 91 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 92 | end # or else data not found in attributes(hash), not an issue as the data can be optional 93 | end 94 | 95 | self 96 | end 97 | 98 | # Deserializes the data based on type 99 | # @param string type Data type 100 | # @param string value Value to be deserialized 101 | # @return [Object] Deserialized data 102 | def _deserialize(type, value) 103 | case type.to_sym 104 | when :DateTime 105 | DateTime.parse(value) 106 | when :Date 107 | Date.parse(value) 108 | when :String 109 | value.to_s 110 | when :Integer 111 | value.to_i 112 | when :Float 113 | value.to_f 114 | when :BOOLEAN 115 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 116 | true 117 | else 118 | false 119 | end 120 | when :Object 121 | # generic object (usually a Hash), return directly 122 | value 123 | when /\AArray<(?.+)>\z/ 124 | inner_type = Regexp.last_match[:inner_type] 125 | value.map { |v| _deserialize(inner_type, v) } 126 | when /\AHash<(?.+?), (?.+)>\z/ 127 | k_type = Regexp.last_match[:k_type] 128 | v_type = Regexp.last_match[:v_type] 129 | {}.tap do |hash| 130 | value.each do |k, v| 131 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 132 | end 133 | end 134 | else # model 135 | temp_model = DocuSign_Rooms.const_get(type).new 136 | temp_model.build_from_hash(value) 137 | end 138 | end 139 | 140 | # Returns the string representation of the object 141 | # @return [String] String presentation of the object 142 | def to_s 143 | to_hash.to_s 144 | end 145 | 146 | # to_body is an alias to to_hash (backward compatibility) 147 | # @return [Hash] Returns the object in the form of hash 148 | def to_body 149 | to_hash 150 | end 151 | 152 | # Returns the object in the form of hash 153 | # @return [Hash] Returns the object in the form of hash 154 | def to_hash 155 | hash = {} 156 | self.class.attribute_map.each_pair do |attr, param| 157 | value = self.send(attr) 158 | next if value.nil? 159 | hash[param] = _to_hash(value) 160 | end 161 | hash 162 | end 163 | 164 | # Outputs non-array value in the form of hash 165 | # For object, use to_hash. Otherwise, just return the value 166 | # @param [Object] value Any valid value 167 | # @return [Hash] Returns the value in the form of hash 168 | def _to_hash(value) 169 | if value.is_a?(Array) 170 | value.compact.map { |v| _to_hash(v) } 171 | elsif value.is_a?(Hash) 172 | {}.tap do |hash| 173 | value.each { |k, v| hash[k] = _to_hash(v) } 174 | end 175 | elsif value.respond_to? :to_hash 176 | value.to_hash 177 | else 178 | value 179 | end 180 | end 181 | 182 | end 183 | end 184 | -------------------------------------------------------------------------------- /lib/docusign_rooms/models/field_data.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class FieldData 16 | attr_accessor :data 17 | 18 | # Attribute mapping from ruby-style variable name to JSON key. 19 | def self.attribute_map 20 | { 21 | :'data' => :'data' 22 | } 23 | end 24 | 25 | # Attribute type mapping. 26 | def self.swagger_types 27 | { 28 | :'data' => :'Hash' 29 | } 30 | end 31 | 32 | # Initializes the object 33 | # @param [Hash] attributes Model attributes in the form of hash 34 | def initialize(attributes = {}) 35 | return unless attributes.is_a?(Hash) 36 | 37 | # convert string to symbol for hash key 38 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 39 | 40 | if attributes.has_key?(:'data') 41 | if (value = attributes[:'data']).is_a?(Hash) 42 | self.data = value 43 | end 44 | end 45 | end 46 | 47 | # Show invalid properties with the reasons. Usually used together with valid? 48 | # @return Array for valid properties with the reasons 49 | def list_invalid_properties 50 | invalid_properties = Array.new 51 | invalid_properties 52 | end 53 | 54 | # Check to see if the all the properties in the model are valid 55 | # @return true if the model is valid 56 | def valid? 57 | true 58 | end 59 | 60 | # Checks equality by comparing each attribute. 61 | # @param [Object] Object to be compared 62 | def ==(o) 63 | return true if self.equal?(o) 64 | self.class == o.class && 65 | data == o.data 66 | end 67 | 68 | # @see the `==` method 69 | # @param [Object] Object to be compared 70 | def eql?(o) 71 | self == o 72 | end 73 | 74 | # Calculates hash code according to all attributes. 75 | # @return [Fixnum] Hash code 76 | def hash 77 | [data].hash 78 | end 79 | 80 | # Builds the object from hash 81 | # @param [Hash] attributes Model attributes in the form of hash 82 | # @return [Object] Returns the model itself 83 | def build_from_hash(attributes) 84 | return nil unless attributes.is_a?(Hash) 85 | self.class.swagger_types.each_pair do |key, type| 86 | if type =~ /\AArray<(.*)>/i 87 | # check to ensure the input is an array given that the attribute 88 | # is documented as an array but the input is not 89 | if attributes[self.class.attribute_map[key]].is_a?(Array) 90 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 91 | end 92 | elsif !attributes[self.class.attribute_map[key]].nil? 93 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 94 | end # or else data not found in attributes(hash), not an issue as the data can be optional 95 | end 96 | 97 | self 98 | end 99 | 100 | # Deserializes the data based on type 101 | # @param string type Data type 102 | # @param string value Value to be deserialized 103 | # @return [Object] Deserialized data 104 | def _deserialize(type, value) 105 | case type.to_sym 106 | when :DateTime 107 | DateTime.parse(value) 108 | when :Date 109 | Date.parse(value) 110 | when :String 111 | value.to_s 112 | when :Integer 113 | value.to_i 114 | when :Float 115 | value.to_f 116 | when :BOOLEAN 117 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 118 | true 119 | else 120 | false 121 | end 122 | when :Object 123 | # generic object (usually a Hash), return directly 124 | value 125 | when /\AArray<(?.+)>\z/ 126 | inner_type = Regexp.last_match[:inner_type] 127 | value.map { |v| _deserialize(inner_type, v) } 128 | when /\AHash<(?.+?), (?.+)>\z/ 129 | k_type = Regexp.last_match[:k_type] 130 | v_type = Regexp.last_match[:v_type] 131 | {}.tap do |hash| 132 | value.each do |k, v| 133 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 134 | end 135 | end 136 | else # model 137 | temp_model = DocuSign_Rooms.const_get(type).new 138 | temp_model.build_from_hash(value) 139 | end 140 | end 141 | 142 | # Returns the string representation of the object 143 | # @return [String] String presentation of the object 144 | def to_s 145 | to_hash.to_s 146 | end 147 | 148 | # to_body is an alias to to_hash (backward compatibility) 149 | # @return [Hash] Returns the object in the form of hash 150 | def to_body 151 | to_hash 152 | end 153 | 154 | # Returns the object in the form of hash 155 | # @return [Hash] Returns the object in the form of hash 156 | def to_hash 157 | hash = {} 158 | self.class.attribute_map.each_pair do |attr, param| 159 | value = self.send(attr) 160 | next if value.nil? 161 | hash[param] = _to_hash(value) 162 | end 163 | hash 164 | end 165 | 166 | # Outputs non-array value in the form of hash 167 | # For object, use to_hash. Otherwise, just return the value 168 | # @param [Object] value Any valid value 169 | # @return [Hash] Returns the value in the form of hash 170 | def _to_hash(value) 171 | if value.is_a?(Array) 172 | value.compact.map { |v| _to_hash(v) } 173 | elsif value.is_a?(Hash) 174 | {}.tap do |hash| 175 | value.each { |k, v| hash[k] = _to_hash(v) } 176 | end 177 | elsif value.respond_to? :to_hash 178 | value.to_hash 179 | else 180 | value 181 | end 182 | end 183 | 184 | end 185 | end 186 | -------------------------------------------------------------------------------- /lib/docusign_rooms/models/nullable_field_data.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class NullableFieldData 16 | attr_accessor :data 17 | 18 | # Attribute mapping from ruby-style variable name to JSON key. 19 | def self.attribute_map 20 | { 21 | :'data' => :'data' 22 | } 23 | end 24 | 25 | # Attribute type mapping. 26 | def self.swagger_types 27 | { 28 | :'data' => :'Hash' 29 | } 30 | end 31 | 32 | # Initializes the object 33 | # @param [Hash] attributes Model attributes in the form of hash 34 | def initialize(attributes = {}) 35 | return unless attributes.is_a?(Hash) 36 | 37 | # convert string to symbol for hash key 38 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 39 | 40 | if attributes.has_key?(:'data') 41 | if (value = attributes[:'data']).is_a?(Hash) 42 | self.data = value 43 | end 44 | end 45 | end 46 | 47 | # Show invalid properties with the reasons. Usually used together with valid? 48 | # @return Array for valid properties with the reasons 49 | def list_invalid_properties 50 | invalid_properties = Array.new 51 | invalid_properties 52 | end 53 | 54 | # Check to see if the all the properties in the model are valid 55 | # @return true if the model is valid 56 | def valid? 57 | true 58 | end 59 | 60 | # Checks equality by comparing each attribute. 61 | # @param [Object] Object to be compared 62 | def ==(o) 63 | return true if self.equal?(o) 64 | self.class == o.class && 65 | data == o.data 66 | end 67 | 68 | # @see the `==` method 69 | # @param [Object] Object to be compared 70 | def eql?(o) 71 | self == o 72 | end 73 | 74 | # Calculates hash code according to all attributes. 75 | # @return [Fixnum] Hash code 76 | def hash 77 | [data].hash 78 | end 79 | 80 | # Builds the object from hash 81 | # @param [Hash] attributes Model attributes in the form of hash 82 | # @return [Object] Returns the model itself 83 | def build_from_hash(attributes) 84 | return nil unless attributes.is_a?(Hash) 85 | self.class.swagger_types.each_pair do |key, type| 86 | if type =~ /\AArray<(.*)>/i 87 | # check to ensure the input is an array given that the attribute 88 | # is documented as an array but the input is not 89 | if attributes[self.class.attribute_map[key]].is_a?(Array) 90 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 91 | end 92 | elsif !attributes[self.class.attribute_map[key]].nil? 93 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 94 | end # or else data not found in attributes(hash), not an issue as the data can be optional 95 | end 96 | 97 | self 98 | end 99 | 100 | # Deserializes the data based on type 101 | # @param string type Data type 102 | # @param string value Value to be deserialized 103 | # @return [Object] Deserialized data 104 | def _deserialize(type, value) 105 | case type.to_sym 106 | when :DateTime 107 | DateTime.parse(value) 108 | when :Date 109 | Date.parse(value) 110 | when :String 111 | value.to_s 112 | when :Integer 113 | value.to_i 114 | when :Float 115 | value.to_f 116 | when :BOOLEAN 117 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 118 | true 119 | else 120 | false 121 | end 122 | when :Object 123 | # generic object (usually a Hash), return directly 124 | value 125 | when /\AArray<(?.+)>\z/ 126 | inner_type = Regexp.last_match[:inner_type] 127 | value.map { |v| _deserialize(inner_type, v) } 128 | when /\AHash<(?.+?), (?.+)>\z/ 129 | k_type = Regexp.last_match[:k_type] 130 | v_type = Regexp.last_match[:v_type] 131 | {}.tap do |hash| 132 | value.each do |k, v| 133 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 134 | end 135 | end 136 | else # model 137 | temp_model = DocuSign_Rooms.const_get(type).new 138 | temp_model.build_from_hash(value) 139 | end 140 | end 141 | 142 | # Returns the string representation of the object 143 | # @return [String] String presentation of the object 144 | def to_s 145 | to_hash.to_s 146 | end 147 | 148 | # to_body is an alias to to_hash (backward compatibility) 149 | # @return [Hash] Returns the object in the form of hash 150 | def to_body 151 | to_hash 152 | end 153 | 154 | # Returns the object in the form of hash 155 | # @return [Hash] Returns the object in the form of hash 156 | def to_hash 157 | hash = {} 158 | self.class.attribute_map.each_pair do |attr, param| 159 | value = self.send(attr) 160 | next if value.nil? 161 | hash[param] = _to_hash(value) 162 | end 163 | hash 164 | end 165 | 166 | # Outputs non-array value in the form of hash 167 | # For object, use to_hash. Otherwise, just return the value 168 | # @param [Object] value Any valid value 169 | # @return [Hash] Returns the value in the form of hash 170 | def _to_hash(value) 171 | if value.is_a?(Array) 172 | value.compact.map { |v| _to_hash(v) } 173 | elsif value.is_a?(Hash) 174 | {}.tap do |hash| 175 | value.each { |k, v| hash[k] = _to_hash(v) } 176 | end 177 | elsif value.respond_to? :to_hash 178 | value.to_hash 179 | else 180 | value 181 | end 182 | end 183 | 184 | end 185 | end 186 | -------------------------------------------------------------------------------- /lib/docusign_rooms/models/field_data_for_create.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class FieldDataForCreate 16 | attr_accessor :data 17 | 18 | # Attribute mapping from ruby-style variable name to JSON key. 19 | def self.attribute_map 20 | { 21 | :'data' => :'data' 22 | } 23 | end 24 | 25 | # Attribute type mapping. 26 | def self.swagger_types 27 | { 28 | :'data' => :'Hash' 29 | } 30 | end 31 | 32 | # Initializes the object 33 | # @param [Hash] attributes Model attributes in the form of hash 34 | def initialize(attributes = {}) 35 | return unless attributes.is_a?(Hash) 36 | 37 | # convert string to symbol for hash key 38 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 39 | 40 | if attributes.has_key?(:'data') 41 | if (value = attributes[:'data']).is_a?(Hash) 42 | self.data = value 43 | end 44 | end 45 | end 46 | 47 | # Show invalid properties with the reasons. Usually used together with valid? 48 | # @return Array for valid properties with the reasons 49 | def list_invalid_properties 50 | invalid_properties = Array.new 51 | invalid_properties 52 | end 53 | 54 | # Check to see if the all the properties in the model are valid 55 | # @return true if the model is valid 56 | def valid? 57 | true 58 | end 59 | 60 | # Checks equality by comparing each attribute. 61 | # @param [Object] Object to be compared 62 | def ==(o) 63 | return true if self.equal?(o) 64 | self.class == o.class && 65 | data == o.data 66 | end 67 | 68 | # @see the `==` method 69 | # @param [Object] Object to be compared 70 | def eql?(o) 71 | self == o 72 | end 73 | 74 | # Calculates hash code according to all attributes. 75 | # @return [Fixnum] Hash code 76 | def hash 77 | [data].hash 78 | end 79 | 80 | # Builds the object from hash 81 | # @param [Hash] attributes Model attributes in the form of hash 82 | # @return [Object] Returns the model itself 83 | def build_from_hash(attributes) 84 | return nil unless attributes.is_a?(Hash) 85 | self.class.swagger_types.each_pair do |key, type| 86 | if type =~ /\AArray<(.*)>/i 87 | # check to ensure the input is an array given that the attribute 88 | # is documented as an array but the input is not 89 | if attributes[self.class.attribute_map[key]].is_a?(Array) 90 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 91 | end 92 | elsif !attributes[self.class.attribute_map[key]].nil? 93 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 94 | end # or else data not found in attributes(hash), not an issue as the data can be optional 95 | end 96 | 97 | self 98 | end 99 | 100 | # Deserializes the data based on type 101 | # @param string type Data type 102 | # @param string value Value to be deserialized 103 | # @return [Object] Deserialized data 104 | def _deserialize(type, value) 105 | case type.to_sym 106 | when :DateTime 107 | DateTime.parse(value) 108 | when :Date 109 | Date.parse(value) 110 | when :String 111 | value.to_s 112 | when :Integer 113 | value.to_i 114 | when :Float 115 | value.to_f 116 | when :BOOLEAN 117 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 118 | true 119 | else 120 | false 121 | end 122 | when :Object 123 | # generic object (usually a Hash), return directly 124 | value 125 | when /\AArray<(?.+)>\z/ 126 | inner_type = Regexp.last_match[:inner_type] 127 | value.map { |v| _deserialize(inner_type, v) } 128 | when /\AHash<(?.+?), (?.+)>\z/ 129 | k_type = Regexp.last_match[:k_type] 130 | v_type = Regexp.last_match[:v_type] 131 | {}.tap do |hash| 132 | value.each do |k, v| 133 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 134 | end 135 | end 136 | else # model 137 | temp_model = DocuSign_Rooms.const_get(type).new 138 | temp_model.build_from_hash(value) 139 | end 140 | end 141 | 142 | # Returns the string representation of the object 143 | # @return [String] String presentation of the object 144 | def to_s 145 | to_hash.to_s 146 | end 147 | 148 | # to_body is an alias to to_hash (backward compatibility) 149 | # @return [Hash] Returns the object in the form of hash 150 | def to_body 151 | to_hash 152 | end 153 | 154 | # Returns the object in the form of hash 155 | # @return [Hash] Returns the object in the form of hash 156 | def to_hash 157 | hash = {} 158 | self.class.attribute_map.each_pair do |attr, param| 159 | value = self.send(attr) 160 | next if value.nil? 161 | hash[param] = _to_hash(value) 162 | end 163 | hash 164 | end 165 | 166 | # Outputs non-array value in the form of hash 167 | # For object, use to_hash. Otherwise, just return the value 168 | # @param [Object] value Any valid value 169 | # @return [Hash] Returns the value in the form of hash 170 | def _to_hash(value) 171 | if value.is_a?(Array) 172 | value.compact.map { |v| _to_hash(v) } 173 | elsif value.is_a?(Hash) 174 | {}.tap do |hash| 175 | value.each { |k, v| hash[k] = _to_hash(v) } 176 | end 177 | elsif value.respond_to? :to_hash 178 | value.to_hash 179 | else 180 | value 181 | end 182 | end 183 | 184 | end 185 | end 186 | -------------------------------------------------------------------------------- /lib/docusign_rooms/models/field_data_for_update.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class FieldDataForUpdate 16 | attr_accessor :data 17 | 18 | # Attribute mapping from ruby-style variable name to JSON key. 19 | def self.attribute_map 20 | { 21 | :'data' => :'data' 22 | } 23 | end 24 | 25 | # Attribute type mapping. 26 | def self.swagger_types 27 | { 28 | :'data' => :'Hash' 29 | } 30 | end 31 | 32 | # Initializes the object 33 | # @param [Hash] attributes Model attributes in the form of hash 34 | def initialize(attributes = {}) 35 | return unless attributes.is_a?(Hash) 36 | 37 | # convert string to symbol for hash key 38 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 39 | 40 | if attributes.has_key?(:'data') 41 | if (value = attributes[:'data']).is_a?(Hash) 42 | self.data = value 43 | end 44 | end 45 | end 46 | 47 | # Show invalid properties with the reasons. Usually used together with valid? 48 | # @return Array for valid properties with the reasons 49 | def list_invalid_properties 50 | invalid_properties = Array.new 51 | invalid_properties 52 | end 53 | 54 | # Check to see if the all the properties in the model are valid 55 | # @return true if the model is valid 56 | def valid? 57 | true 58 | end 59 | 60 | # Checks equality by comparing each attribute. 61 | # @param [Object] Object to be compared 62 | def ==(o) 63 | return true if self.equal?(o) 64 | self.class == o.class && 65 | data == o.data 66 | end 67 | 68 | # @see the `==` method 69 | # @param [Object] Object to be compared 70 | def eql?(o) 71 | self == o 72 | end 73 | 74 | # Calculates hash code according to all attributes. 75 | # @return [Fixnum] Hash code 76 | def hash 77 | [data].hash 78 | end 79 | 80 | # Builds the object from hash 81 | # @param [Hash] attributes Model attributes in the form of hash 82 | # @return [Object] Returns the model itself 83 | def build_from_hash(attributes) 84 | return nil unless attributes.is_a?(Hash) 85 | self.class.swagger_types.each_pair do |key, type| 86 | if type =~ /\AArray<(.*)>/i 87 | # check to ensure the input is an array given that the attribute 88 | # is documented as an array but the input is not 89 | if attributes[self.class.attribute_map[key]].is_a?(Array) 90 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 91 | end 92 | elsif !attributes[self.class.attribute_map[key]].nil? 93 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 94 | end # or else data not found in attributes(hash), not an issue as the data can be optional 95 | end 96 | 97 | self 98 | end 99 | 100 | # Deserializes the data based on type 101 | # @param string type Data type 102 | # @param string value Value to be deserialized 103 | # @return [Object] Deserialized data 104 | def _deserialize(type, value) 105 | case type.to_sym 106 | when :DateTime 107 | DateTime.parse(value) 108 | when :Date 109 | Date.parse(value) 110 | when :String 111 | value.to_s 112 | when :Integer 113 | value.to_i 114 | when :Float 115 | value.to_f 116 | when :BOOLEAN 117 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 118 | true 119 | else 120 | false 121 | end 122 | when :Object 123 | # generic object (usually a Hash), return directly 124 | value 125 | when /\AArray<(?.+)>\z/ 126 | inner_type = Regexp.last_match[:inner_type] 127 | value.map { |v| _deserialize(inner_type, v) } 128 | when /\AHash<(?.+?), (?.+)>\z/ 129 | k_type = Regexp.last_match[:k_type] 130 | v_type = Regexp.last_match[:v_type] 131 | {}.tap do |hash| 132 | value.each do |k, v| 133 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 134 | end 135 | end 136 | else # model 137 | temp_model = DocuSign_Rooms.const_get(type).new 138 | temp_model.build_from_hash(value) 139 | end 140 | end 141 | 142 | # Returns the string representation of the object 143 | # @return [String] String presentation of the object 144 | def to_s 145 | to_hash.to_s 146 | end 147 | 148 | # to_body is an alias to to_hash (backward compatibility) 149 | # @return [Hash] Returns the object in the form of hash 150 | def to_body 151 | to_hash 152 | end 153 | 154 | # Returns the object in the form of hash 155 | # @return [Hash] Returns the object in the form of hash 156 | def to_hash 157 | hash = {} 158 | self.class.attribute_map.each_pair do |attr, param| 159 | value = self.send(attr) 160 | next if value.nil? 161 | hash[param] = _to_hash(value) 162 | end 163 | hash 164 | end 165 | 166 | # Outputs non-array value in the form of hash 167 | # For object, use to_hash. Otherwise, just return the value 168 | # @param [Object] value Any valid value 169 | # @return [Hash] Returns the value in the form of hash 170 | def _to_hash(value) 171 | if value.is_a?(Array) 172 | value.compact.map { |v| _to_hash(v) } 173 | elsif value.is_a?(Hash) 174 | {}.tap do |hash| 175 | value.each { |k, v| hash[k] = _to_hash(v) } 176 | end 177 | elsif value.respond_to? :to_hash 178 | value.to_hash 179 | else 180 | value 181 | end 182 | end 183 | 184 | end 185 | end 186 | -------------------------------------------------------------------------------- /lib/docusign_rooms/models/global_states.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class GlobalStates 16 | attr_accessor :states 17 | 18 | # Attribute mapping from ruby-style variable name to JSON key. 19 | def self.attribute_map 20 | { 21 | :'states' => :'states' 22 | } 23 | end 24 | 25 | # Attribute type mapping. 26 | def self.swagger_types 27 | { 28 | :'states' => :'Array' 29 | } 30 | end 31 | 32 | # Initializes the object 33 | # @param [Hash] attributes Model attributes in the form of hash 34 | def initialize(attributes = {}) 35 | return unless attributes.is_a?(Hash) 36 | 37 | # convert string to symbol for hash key 38 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 39 | 40 | if attributes.has_key?(:'states') 41 | if (value = attributes[:'states']).is_a?(Array) 42 | self.states = value 43 | end 44 | end 45 | end 46 | 47 | # Show invalid properties with the reasons. Usually used together with valid? 48 | # @return Array for valid properties with the reasons 49 | def list_invalid_properties 50 | invalid_properties = Array.new 51 | invalid_properties 52 | end 53 | 54 | # Check to see if the all the properties in the model are valid 55 | # @return true if the model is valid 56 | def valid? 57 | true 58 | end 59 | 60 | # Checks equality by comparing each attribute. 61 | # @param [Object] Object to be compared 62 | def ==(o) 63 | return true if self.equal?(o) 64 | self.class == o.class && 65 | states == o.states 66 | end 67 | 68 | # @see the `==` method 69 | # @param [Object] Object to be compared 70 | def eql?(o) 71 | self == o 72 | end 73 | 74 | # Calculates hash code according to all attributes. 75 | # @return [Fixnum] Hash code 76 | def hash 77 | [states].hash 78 | end 79 | 80 | # Builds the object from hash 81 | # @param [Hash] attributes Model attributes in the form of hash 82 | # @return [Object] Returns the model itself 83 | def build_from_hash(attributes) 84 | return nil unless attributes.is_a?(Hash) 85 | self.class.swagger_types.each_pair do |key, type| 86 | if type =~ /\AArray<(.*)>/i 87 | # check to ensure the input is an array given that the attribute 88 | # is documented as an array but the input is not 89 | if attributes[self.class.attribute_map[key]].is_a?(Array) 90 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 91 | end 92 | elsif !attributes[self.class.attribute_map[key]].nil? 93 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 94 | end # or else data not found in attributes(hash), not an issue as the data can be optional 95 | end 96 | 97 | self 98 | end 99 | 100 | # Deserializes the data based on type 101 | # @param string type Data type 102 | # @param string value Value to be deserialized 103 | # @return [Object] Deserialized data 104 | def _deserialize(type, value) 105 | case type.to_sym 106 | when :DateTime 107 | DateTime.parse(value) 108 | when :Date 109 | Date.parse(value) 110 | when :String 111 | value.to_s 112 | when :Integer 113 | value.to_i 114 | when :Float 115 | value.to_f 116 | when :BOOLEAN 117 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 118 | true 119 | else 120 | false 121 | end 122 | when :Object 123 | # generic object (usually a Hash), return directly 124 | value 125 | when /\AArray<(?.+)>\z/ 126 | inner_type = Regexp.last_match[:inner_type] 127 | value.map { |v| _deserialize(inner_type, v) } 128 | when /\AHash<(?.+?), (?.+)>\z/ 129 | k_type = Regexp.last_match[:k_type] 130 | v_type = Regexp.last_match[:v_type] 131 | {}.tap do |hash| 132 | value.each do |k, v| 133 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 134 | end 135 | end 136 | else # model 137 | temp_model = DocuSign_Rooms.const_get(type).new 138 | temp_model.build_from_hash(value) 139 | end 140 | end 141 | 142 | # Returns the string representation of the object 143 | # @return [String] String presentation of the object 144 | def to_s 145 | to_hash.to_s 146 | end 147 | 148 | # to_body is an alias to to_hash (backward compatibility) 149 | # @return [Hash] Returns the object in the form of hash 150 | def to_body 151 | to_hash 152 | end 153 | 154 | # Returns the object in the form of hash 155 | # @return [Hash] Returns the object in the form of hash 156 | def to_hash 157 | hash = {} 158 | self.class.attribute_map.each_pair do |attr, param| 159 | value = self.send(attr) 160 | next if value.nil? 161 | hash[param] = _to_hash(value) 162 | end 163 | hash 164 | end 165 | 166 | # Outputs non-array value in the form of hash 167 | # For object, use to_hash. Otherwise, just return the value 168 | # @param [Object] value Any valid value 169 | # @return [Hash] Returns the value in the form of hash 170 | def _to_hash(value) 171 | if value.is_a?(Array) 172 | value.compact.map { |v| _to_hash(v) } 173 | elsif value.is_a?(Hash) 174 | {}.tap do |hash| 175 | value.each { |k, v| hash[k] = _to_hash(v) } 176 | end 177 | elsif value.respond_to? :to_hash 178 | value.to_hash 179 | else 180 | value 181 | end 182 | end 183 | 184 | end 185 | end 186 | -------------------------------------------------------------------------------- /lib/docusign_rooms/models/envelope.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class Envelope 16 | attr_accessor :e_sign_envelope_id 17 | 18 | # Attribute mapping from ruby-style variable name to JSON key. 19 | def self.attribute_map 20 | { 21 | :'e_sign_envelope_id' => :'eSignEnvelopeId' 22 | } 23 | end 24 | 25 | # Attribute type mapping. 26 | def self.swagger_types 27 | { 28 | :'e_sign_envelope_id' => :'String' 29 | } 30 | end 31 | 32 | # Initializes the object 33 | # @param [Hash] attributes Model attributes in the form of hash 34 | def initialize(attributes = {}) 35 | return unless attributes.is_a?(Hash) 36 | 37 | # convert string to symbol for hash key 38 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 39 | 40 | if attributes.has_key?(:'eSignEnvelopeId') 41 | self.e_sign_envelope_id = attributes[:'eSignEnvelopeId'] 42 | end 43 | end 44 | 45 | # Show invalid properties with the reasons. Usually used together with valid? 46 | # @return Array for valid properties with the reasons 47 | def list_invalid_properties 48 | invalid_properties = Array.new 49 | invalid_properties 50 | end 51 | 52 | # Check to see if the all the properties in the model are valid 53 | # @return true if the model is valid 54 | def valid? 55 | true 56 | end 57 | 58 | # Checks equality by comparing each attribute. 59 | # @param [Object] Object to be compared 60 | def ==(o) 61 | return true if self.equal?(o) 62 | self.class == o.class && 63 | e_sign_envelope_id == o.e_sign_envelope_id 64 | end 65 | 66 | # @see the `==` method 67 | # @param [Object] Object to be compared 68 | def eql?(o) 69 | self == o 70 | end 71 | 72 | # Calculates hash code according to all attributes. 73 | # @return [Fixnum] Hash code 74 | def hash 75 | [e_sign_envelope_id].hash 76 | end 77 | 78 | # Builds the object from hash 79 | # @param [Hash] attributes Model attributes in the form of hash 80 | # @return [Object] Returns the model itself 81 | def build_from_hash(attributes) 82 | return nil unless attributes.is_a?(Hash) 83 | self.class.swagger_types.each_pair do |key, type| 84 | if type =~ /\AArray<(.*)>/i 85 | # check to ensure the input is an array given that the attribute 86 | # is documented as an array but the input is not 87 | if attributes[self.class.attribute_map[key]].is_a?(Array) 88 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 89 | end 90 | elsif !attributes[self.class.attribute_map[key]].nil? 91 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 92 | end # or else data not found in attributes(hash), not an issue as the data can be optional 93 | end 94 | 95 | self 96 | end 97 | 98 | # Deserializes the data based on type 99 | # @param string type Data type 100 | # @param string value Value to be deserialized 101 | # @return [Object] Deserialized data 102 | def _deserialize(type, value) 103 | case type.to_sym 104 | when :DateTime 105 | DateTime.parse(value) 106 | when :Date 107 | Date.parse(value) 108 | when :String 109 | value.to_s 110 | when :Integer 111 | value.to_i 112 | when :Float 113 | value.to_f 114 | when :BOOLEAN 115 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 116 | true 117 | else 118 | false 119 | end 120 | when :Object 121 | # generic object (usually a Hash), return directly 122 | value 123 | when /\AArray<(?.+)>\z/ 124 | inner_type = Regexp.last_match[:inner_type] 125 | value.map { |v| _deserialize(inner_type, v) } 126 | when /\AHash<(?.+?), (?.+)>\z/ 127 | k_type = Regexp.last_match[:k_type] 128 | v_type = Regexp.last_match[:v_type] 129 | {}.tap do |hash| 130 | value.each do |k, v| 131 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 132 | end 133 | end 134 | else # model 135 | temp_model = DocuSign_Rooms.const_get(type).new 136 | temp_model.build_from_hash(value) 137 | end 138 | end 139 | 140 | # Returns the string representation of the object 141 | # @return [String] String presentation of the object 142 | def to_s 143 | to_hash.to_s 144 | end 145 | 146 | # to_body is an alias to to_hash (backward compatibility) 147 | # @return [Hash] Returns the object in the form of hash 148 | def to_body 149 | to_hash 150 | end 151 | 152 | # Returns the object in the form of hash 153 | # @return [Hash] Returns the object in the form of hash 154 | def to_hash 155 | hash = {} 156 | self.class.attribute_map.each_pair do |attr, param| 157 | value = self.send(attr) 158 | next if value.nil? 159 | hash[param] = _to_hash(value) 160 | end 161 | hash 162 | end 163 | 164 | # Outputs non-array value in the form of hash 165 | # For object, use to_hash. Otherwise, just return the value 166 | # @param [Object] value Any valid value 167 | # @return [Hash] Returns the value in the form of hash 168 | def _to_hash(value) 169 | if value.is_a?(Array) 170 | value.compact.map { |v| _to_hash(v) } 171 | elsif value.is_a?(Hash) 172 | {}.tap do |hash| 173 | value.each { |k, v| hash[k] = _to_hash(v) } 174 | end 175 | elsif value.respond_to? :to_hash 176 | value.to_hash 177 | else 178 | value 179 | end 180 | end 181 | 182 | end 183 | end 184 | -------------------------------------------------------------------------------- /lib/docusign_rooms/models/global_countries.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class GlobalCountries 16 | attr_accessor :countries 17 | 18 | # Attribute mapping from ruby-style variable name to JSON key. 19 | def self.attribute_map 20 | { 21 | :'countries' => :'countries' 22 | } 23 | end 24 | 25 | # Attribute type mapping. 26 | def self.swagger_types 27 | { 28 | :'countries' => :'Array' 29 | } 30 | end 31 | 32 | # Initializes the object 33 | # @param [Hash] attributes Model attributes in the form of hash 34 | def initialize(attributes = {}) 35 | return unless attributes.is_a?(Hash) 36 | 37 | # convert string to symbol for hash key 38 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 39 | 40 | if attributes.has_key?(:'countries') 41 | if (value = attributes[:'countries']).is_a?(Array) 42 | self.countries = value 43 | end 44 | end 45 | end 46 | 47 | # Show invalid properties with the reasons. Usually used together with valid? 48 | # @return Array for valid properties with the reasons 49 | def list_invalid_properties 50 | invalid_properties = Array.new 51 | invalid_properties 52 | end 53 | 54 | # Check to see if the all the properties in the model are valid 55 | # @return true if the model is valid 56 | def valid? 57 | true 58 | end 59 | 60 | # Checks equality by comparing each attribute. 61 | # @param [Object] Object to be compared 62 | def ==(o) 63 | return true if self.equal?(o) 64 | self.class == o.class && 65 | countries == o.countries 66 | end 67 | 68 | # @see the `==` method 69 | # @param [Object] Object to be compared 70 | def eql?(o) 71 | self == o 72 | end 73 | 74 | # Calculates hash code according to all attributes. 75 | # @return [Fixnum] Hash code 76 | def hash 77 | [countries].hash 78 | end 79 | 80 | # Builds the object from hash 81 | # @param [Hash] attributes Model attributes in the form of hash 82 | # @return [Object] Returns the model itself 83 | def build_from_hash(attributes) 84 | return nil unless attributes.is_a?(Hash) 85 | self.class.swagger_types.each_pair do |key, type| 86 | if type =~ /\AArray<(.*)>/i 87 | # check to ensure the input is an array given that the attribute 88 | # is documented as an array but the input is not 89 | if attributes[self.class.attribute_map[key]].is_a?(Array) 90 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 91 | end 92 | elsif !attributes[self.class.attribute_map[key]].nil? 93 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 94 | end # or else data not found in attributes(hash), not an issue as the data can be optional 95 | end 96 | 97 | self 98 | end 99 | 100 | # Deserializes the data based on type 101 | # @param string type Data type 102 | # @param string value Value to be deserialized 103 | # @return [Object] Deserialized data 104 | def _deserialize(type, value) 105 | case type.to_sym 106 | when :DateTime 107 | DateTime.parse(value) 108 | when :Date 109 | Date.parse(value) 110 | when :String 111 | value.to_s 112 | when :Integer 113 | value.to_i 114 | when :Float 115 | value.to_f 116 | when :BOOLEAN 117 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 118 | true 119 | else 120 | false 121 | end 122 | when :Object 123 | # generic object (usually a Hash), return directly 124 | value 125 | when /\AArray<(?.+)>\z/ 126 | inner_type = Regexp.last_match[:inner_type] 127 | value.map { |v| _deserialize(inner_type, v) } 128 | when /\AHash<(?.+?), (?.+)>\z/ 129 | k_type = Regexp.last_match[:k_type] 130 | v_type = Regexp.last_match[:v_type] 131 | {}.tap do |hash| 132 | value.each do |k, v| 133 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 134 | end 135 | end 136 | else # model 137 | temp_model = DocuSign_Rooms.const_get(type).new 138 | temp_model.build_from_hash(value) 139 | end 140 | end 141 | 142 | # Returns the string representation of the object 143 | # @return [String] String presentation of the object 144 | def to_s 145 | to_hash.to_s 146 | end 147 | 148 | # to_body is an alias to to_hash (backward compatibility) 149 | # @return [Hash] Returns the object in the form of hash 150 | def to_body 151 | to_hash 152 | end 153 | 154 | # Returns the object in the form of hash 155 | # @return [Hash] Returns the object in the form of hash 156 | def to_hash 157 | hash = {} 158 | self.class.attribute_map.each_pair do |attr, param| 159 | value = self.send(attr) 160 | next if value.nil? 161 | hash[param] = _to_hash(value) 162 | end 163 | hash 164 | end 165 | 166 | # Outputs non-array value in the form of hash 167 | # For object, use to_hash. Otherwise, just return the value 168 | # @param [Object] value Any valid value 169 | # @return [Hash] Returns the value in the form of hash 170 | def _to_hash(value) 171 | if value.is_a?(Array) 172 | value.compact.map { |v| _to_hash(v) } 173 | elsif value.is_a?(Hash) 174 | {}.tap do |hash| 175 | value.each { |k, v| hash[k] = _to_hash(v) } 176 | end 177 | elsif value.respond_to? :to_hash 178 | value.to_hash 179 | else 180 | value 181 | end 182 | end 183 | 184 | end 185 | end 186 | -------------------------------------------------------------------------------- /lib/docusign_rooms/models/room_user_removal_detail.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class RoomUserRemovalDetail 16 | attr_accessor :revocation_date 17 | 18 | # Attribute mapping from ruby-style variable name to JSON key. 19 | def self.attribute_map 20 | { 21 | :'revocation_date' => :'revocationDate' 22 | } 23 | end 24 | 25 | # Attribute type mapping. 26 | def self.swagger_types 27 | { 28 | :'revocation_date' => :'DateTime' 29 | } 30 | end 31 | 32 | # Initializes the object 33 | # @param [Hash] attributes Model attributes in the form of hash 34 | def initialize(attributes = {}) 35 | return unless attributes.is_a?(Hash) 36 | 37 | # convert string to symbol for hash key 38 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 39 | 40 | if attributes.has_key?(:'revocationDate') 41 | self.revocation_date = attributes[:'revocationDate'] 42 | end 43 | end 44 | 45 | # Show invalid properties with the reasons. Usually used together with valid? 46 | # @return Array for valid properties with the reasons 47 | def list_invalid_properties 48 | invalid_properties = Array.new 49 | invalid_properties 50 | end 51 | 52 | # Check to see if the all the properties in the model are valid 53 | # @return true if the model is valid 54 | def valid? 55 | true 56 | end 57 | 58 | # Checks equality by comparing each attribute. 59 | # @param [Object] Object to be compared 60 | def ==(o) 61 | return true if self.equal?(o) 62 | self.class == o.class && 63 | revocation_date == o.revocation_date 64 | end 65 | 66 | # @see the `==` method 67 | # @param [Object] Object to be compared 68 | def eql?(o) 69 | self == o 70 | end 71 | 72 | # Calculates hash code according to all attributes. 73 | # @return [Fixnum] Hash code 74 | def hash 75 | [revocation_date].hash 76 | end 77 | 78 | # Builds the object from hash 79 | # @param [Hash] attributes Model attributes in the form of hash 80 | # @return [Object] Returns the model itself 81 | def build_from_hash(attributes) 82 | return nil unless attributes.is_a?(Hash) 83 | self.class.swagger_types.each_pair do |key, type| 84 | if type =~ /\AArray<(.*)>/i 85 | # check to ensure the input is an array given that the attribute 86 | # is documented as an array but the input is not 87 | if attributes[self.class.attribute_map[key]].is_a?(Array) 88 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 89 | end 90 | elsif !attributes[self.class.attribute_map[key]].nil? 91 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 92 | end # or else data not found in attributes(hash), not an issue as the data can be optional 93 | end 94 | 95 | self 96 | end 97 | 98 | # Deserializes the data based on type 99 | # @param string type Data type 100 | # @param string value Value to be deserialized 101 | # @return [Object] Deserialized data 102 | def _deserialize(type, value) 103 | case type.to_sym 104 | when :DateTime 105 | DateTime.parse(value) 106 | when :Date 107 | Date.parse(value) 108 | when :String 109 | value.to_s 110 | when :Integer 111 | value.to_i 112 | when :Float 113 | value.to_f 114 | when :BOOLEAN 115 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 116 | true 117 | else 118 | false 119 | end 120 | when :Object 121 | # generic object (usually a Hash), return directly 122 | value 123 | when /\AArray<(?.+)>\z/ 124 | inner_type = Regexp.last_match[:inner_type] 125 | value.map { |v| _deserialize(inner_type, v) } 126 | when /\AHash<(?.+?), (?.+)>\z/ 127 | k_type = Regexp.last_match[:k_type] 128 | v_type = Regexp.last_match[:v_type] 129 | {}.tap do |hash| 130 | value.each do |k, v| 131 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 132 | end 133 | end 134 | else # model 135 | temp_model = DocuSign_Rooms.const_get(type).new 136 | temp_model.build_from_hash(value) 137 | end 138 | end 139 | 140 | # Returns the string representation of the object 141 | # @return [String] String presentation of the object 142 | def to_s 143 | to_hash.to_s 144 | end 145 | 146 | # to_body is an alias to to_hash (backward compatibility) 147 | # @return [Hash] Returns the object in the form of hash 148 | def to_body 149 | to_hash 150 | end 151 | 152 | # Returns the object in the form of hash 153 | # @return [Hash] Returns the object in the form of hash 154 | def to_hash 155 | hash = {} 156 | self.class.attribute_map.each_pair do |attr, param| 157 | value = self.send(attr) 158 | next if value.nil? 159 | hash[param] = _to_hash(value) 160 | end 161 | hash 162 | end 163 | 164 | # Outputs non-array value in the form of hash 165 | # For object, use to_hash. Otherwise, just return the value 166 | # @param [Object] value Any valid value 167 | # @return [Hash] Returns the value in the form of hash 168 | def _to_hash(value) 169 | if value.is_a?(Array) 170 | value.compact.map { |v| _to_hash(v) } 171 | elsif value.is_a?(Hash) 172 | {}.tap do |hash| 173 | value.each { |k, v| hash[k] = _to_hash(v) } 174 | end 175 | elsif value.respond_to? :to_hash 176 | value.to_hash 177 | else 178 | value 179 | end 180 | end 181 | 182 | end 183 | end 184 | -------------------------------------------------------------------------------- /lib/docusign_rooms/models/global_time_zones.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class GlobalTimeZones 16 | attr_accessor :time_zones 17 | 18 | # Attribute mapping from ruby-style variable name to JSON key. 19 | def self.attribute_map 20 | { 21 | :'time_zones' => :'timeZones' 22 | } 23 | end 24 | 25 | # Attribute type mapping. 26 | def self.swagger_types 27 | { 28 | :'time_zones' => :'Array' 29 | } 30 | end 31 | 32 | # Initializes the object 33 | # @param [Hash] attributes Model attributes in the form of hash 34 | def initialize(attributes = {}) 35 | return unless attributes.is_a?(Hash) 36 | 37 | # convert string to symbol for hash key 38 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 39 | 40 | if attributes.has_key?(:'timeZones') 41 | if (value = attributes[:'timeZones']).is_a?(Array) 42 | self.time_zones = value 43 | end 44 | end 45 | end 46 | 47 | # Show invalid properties with the reasons. Usually used together with valid? 48 | # @return Array for valid properties with the reasons 49 | def list_invalid_properties 50 | invalid_properties = Array.new 51 | invalid_properties 52 | end 53 | 54 | # Check to see if the all the properties in the model are valid 55 | # @return true if the model is valid 56 | def valid? 57 | true 58 | end 59 | 60 | # Checks equality by comparing each attribute. 61 | # @param [Object] Object to be compared 62 | def ==(o) 63 | return true if self.equal?(o) 64 | self.class == o.class && 65 | time_zones == o.time_zones 66 | end 67 | 68 | # @see the `==` method 69 | # @param [Object] Object to be compared 70 | def eql?(o) 71 | self == o 72 | end 73 | 74 | # Calculates hash code according to all attributes. 75 | # @return [Fixnum] Hash code 76 | def hash 77 | [time_zones].hash 78 | end 79 | 80 | # Builds the object from hash 81 | # @param [Hash] attributes Model attributes in the form of hash 82 | # @return [Object] Returns the model itself 83 | def build_from_hash(attributes) 84 | return nil unless attributes.is_a?(Hash) 85 | self.class.swagger_types.each_pair do |key, type| 86 | if type =~ /\AArray<(.*)>/i 87 | # check to ensure the input is an array given that the attribute 88 | # is documented as an array but the input is not 89 | if attributes[self.class.attribute_map[key]].is_a?(Array) 90 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 91 | end 92 | elsif !attributes[self.class.attribute_map[key]].nil? 93 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 94 | end # or else data not found in attributes(hash), not an issue as the data can be optional 95 | end 96 | 97 | self 98 | end 99 | 100 | # Deserializes the data based on type 101 | # @param string type Data type 102 | # @param string value Value to be deserialized 103 | # @return [Object] Deserialized data 104 | def _deserialize(type, value) 105 | case type.to_sym 106 | when :DateTime 107 | DateTime.parse(value) 108 | when :Date 109 | Date.parse(value) 110 | when :String 111 | value.to_s 112 | when :Integer 113 | value.to_i 114 | when :Float 115 | value.to_f 116 | when :BOOLEAN 117 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 118 | true 119 | else 120 | false 121 | end 122 | when :Object 123 | # generic object (usually a Hash), return directly 124 | value 125 | when /\AArray<(?.+)>\z/ 126 | inner_type = Regexp.last_match[:inner_type] 127 | value.map { |v| _deserialize(inner_type, v) } 128 | when /\AHash<(?.+?), (?.+)>\z/ 129 | k_type = Regexp.last_match[:k_type] 130 | v_type = Regexp.last_match[:v_type] 131 | {}.tap do |hash| 132 | value.each do |k, v| 133 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 134 | end 135 | end 136 | else # model 137 | temp_model = DocuSign_Rooms.const_get(type).new 138 | temp_model.build_from_hash(value) 139 | end 140 | end 141 | 142 | # Returns the string representation of the object 143 | # @return [String] String presentation of the object 144 | def to_s 145 | to_hash.to_s 146 | end 147 | 148 | # to_body is an alias to to_hash (backward compatibility) 149 | # @return [Hash] Returns the object in the form of hash 150 | def to_body 151 | to_hash 152 | end 153 | 154 | # Returns the object in the form of hash 155 | # @return [Hash] Returns the object in the form of hash 156 | def to_hash 157 | hash = {} 158 | self.class.attribute_map.each_pair do |attr, param| 159 | value = self.send(attr) 160 | next if value.nil? 161 | hash[param] = _to_hash(value) 162 | end 163 | hash 164 | end 165 | 166 | # Outputs non-array value in the form of hash 167 | # For object, use to_hash. Otherwise, just return the value 168 | # @param [Object] value Any valid value 169 | # @return [Hash] Returns the value in the form of hash 170 | def _to_hash(value) 171 | if value.is_a?(Array) 172 | value.compact.map { |v| _to_hash(v) } 173 | elsif value.is_a?(Hash) 174 | {}.tap do |hash| 175 | value.each { |k, v| hash[k] = _to_hash(v) } 176 | end 177 | elsif value.respond_to? :to_hash 178 | value.to_hash 179 | else 180 | value 181 | end 182 | end 183 | 184 | end 185 | end 186 | -------------------------------------------------------------------------------- /lib/docusign_rooms/models/global_currencies.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class GlobalCurrencies 16 | attr_accessor :currencies 17 | 18 | # Attribute mapping from ruby-style variable name to JSON key. 19 | def self.attribute_map 20 | { 21 | :'currencies' => :'currencies' 22 | } 23 | end 24 | 25 | # Attribute type mapping. 26 | def self.swagger_types 27 | { 28 | :'currencies' => :'Array' 29 | } 30 | end 31 | 32 | # Initializes the object 33 | # @param [Hash] attributes Model attributes in the form of hash 34 | def initialize(attributes = {}) 35 | return unless attributes.is_a?(Hash) 36 | 37 | # convert string to symbol for hash key 38 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 39 | 40 | if attributes.has_key?(:'currencies') 41 | if (value = attributes[:'currencies']).is_a?(Array) 42 | self.currencies = value 43 | end 44 | end 45 | end 46 | 47 | # Show invalid properties with the reasons. Usually used together with valid? 48 | # @return Array for valid properties with the reasons 49 | def list_invalid_properties 50 | invalid_properties = Array.new 51 | invalid_properties 52 | end 53 | 54 | # Check to see if the all the properties in the model are valid 55 | # @return true if the model is valid 56 | def valid? 57 | true 58 | end 59 | 60 | # Checks equality by comparing each attribute. 61 | # @param [Object] Object to be compared 62 | def ==(o) 63 | return true if self.equal?(o) 64 | self.class == o.class && 65 | currencies == o.currencies 66 | end 67 | 68 | # @see the `==` method 69 | # @param [Object] Object to be compared 70 | def eql?(o) 71 | self == o 72 | end 73 | 74 | # Calculates hash code according to all attributes. 75 | # @return [Fixnum] Hash code 76 | def hash 77 | [currencies].hash 78 | end 79 | 80 | # Builds the object from hash 81 | # @param [Hash] attributes Model attributes in the form of hash 82 | # @return [Object] Returns the model itself 83 | def build_from_hash(attributes) 84 | return nil unless attributes.is_a?(Hash) 85 | self.class.swagger_types.each_pair do |key, type| 86 | if type =~ /\AArray<(.*)>/i 87 | # check to ensure the input is an array given that the attribute 88 | # is documented as an array but the input is not 89 | if attributes[self.class.attribute_map[key]].is_a?(Array) 90 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 91 | end 92 | elsif !attributes[self.class.attribute_map[key]].nil? 93 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 94 | end # or else data not found in attributes(hash), not an issue as the data can be optional 95 | end 96 | 97 | self 98 | end 99 | 100 | # Deserializes the data based on type 101 | # @param string type Data type 102 | # @param string value Value to be deserialized 103 | # @return [Object] Deserialized data 104 | def _deserialize(type, value) 105 | case type.to_sym 106 | when :DateTime 107 | DateTime.parse(value) 108 | when :Date 109 | Date.parse(value) 110 | when :String 111 | value.to_s 112 | when :Integer 113 | value.to_i 114 | when :Float 115 | value.to_f 116 | when :BOOLEAN 117 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 118 | true 119 | else 120 | false 121 | end 122 | when :Object 123 | # generic object (usually a Hash), return directly 124 | value 125 | when /\AArray<(?.+)>\z/ 126 | inner_type = Regexp.last_match[:inner_type] 127 | value.map { |v| _deserialize(inner_type, v) } 128 | when /\AHash<(?.+?), (?.+)>\z/ 129 | k_type = Regexp.last_match[:k_type] 130 | v_type = Regexp.last_match[:v_type] 131 | {}.tap do |hash| 132 | value.each do |k, v| 133 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 134 | end 135 | end 136 | else # model 137 | temp_model = DocuSign_Rooms.const_get(type).new 138 | temp_model.build_from_hash(value) 139 | end 140 | end 141 | 142 | # Returns the string representation of the object 143 | # @return [String] String presentation of the object 144 | def to_s 145 | to_hash.to_s 146 | end 147 | 148 | # to_body is an alias to to_hash (backward compatibility) 149 | # @return [Hash] Returns the object in the form of hash 150 | def to_body 151 | to_hash 152 | end 153 | 154 | # Returns the object in the form of hash 155 | # @return [Hash] Returns the object in the form of hash 156 | def to_hash 157 | hash = {} 158 | self.class.attribute_map.each_pair do |attr, param| 159 | value = self.send(attr) 160 | next if value.nil? 161 | hash[param] = _to_hash(value) 162 | end 163 | hash 164 | end 165 | 166 | # Outputs non-array value in the form of hash 167 | # For object, use to_hash. Otherwise, just return the value 168 | # @param [Object] value Any valid value 169 | # @return [Hash] Returns the value in the form of hash 170 | def _to_hash(value) 171 | if value.is_a?(Array) 172 | value.compact.map { |v| _to_hash(v) } 173 | elsif value.is_a?(Hash) 174 | {}.tap do |hash| 175 | value.each { |k, v| hash[k] = _to_hash(v) } 176 | end 177 | elsif value.respond_to? :to_hash 178 | value.to_hash 179 | else 180 | value 181 | end 182 | end 183 | 184 | end 185 | end 186 | -------------------------------------------------------------------------------- /lib/docusign_rooms/models/task_list_for_create.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class TaskListForCreate 16 | attr_accessor :task_list_template_id 17 | 18 | # Attribute mapping from ruby-style variable name to JSON key. 19 | def self.attribute_map 20 | { 21 | :'task_list_template_id' => :'taskListTemplateId' 22 | } 23 | end 24 | 25 | # Attribute type mapping. 26 | def self.swagger_types 27 | { 28 | :'task_list_template_id' => :'Integer' 29 | } 30 | end 31 | 32 | # Initializes the object 33 | # @param [Hash] attributes Model attributes in the form of hash 34 | def initialize(attributes = {}) 35 | return unless attributes.is_a?(Hash) 36 | 37 | # convert string to symbol for hash key 38 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 39 | 40 | if attributes.has_key?(:'taskListTemplateId') 41 | self.task_list_template_id = attributes[:'taskListTemplateId'] 42 | end 43 | end 44 | 45 | # Show invalid properties with the reasons. Usually used together with valid? 46 | # @return Array for valid properties with the reasons 47 | def list_invalid_properties 48 | invalid_properties = Array.new 49 | invalid_properties 50 | end 51 | 52 | # Check to see if the all the properties in the model are valid 53 | # @return true if the model is valid 54 | def valid? 55 | true 56 | end 57 | 58 | # Checks equality by comparing each attribute. 59 | # @param [Object] Object to be compared 60 | def ==(o) 61 | return true if self.equal?(o) 62 | self.class == o.class && 63 | task_list_template_id == o.task_list_template_id 64 | end 65 | 66 | # @see the `==` method 67 | # @param [Object] Object to be compared 68 | def eql?(o) 69 | self == o 70 | end 71 | 72 | # Calculates hash code according to all attributes. 73 | # @return [Fixnum] Hash code 74 | def hash 75 | [task_list_template_id].hash 76 | end 77 | 78 | # Builds the object from hash 79 | # @param [Hash] attributes Model attributes in the form of hash 80 | # @return [Object] Returns the model itself 81 | def build_from_hash(attributes) 82 | return nil unless attributes.is_a?(Hash) 83 | self.class.swagger_types.each_pair do |key, type| 84 | if type =~ /\AArray<(.*)>/i 85 | # check to ensure the input is an array given that the attribute 86 | # is documented as an array but the input is not 87 | if attributes[self.class.attribute_map[key]].is_a?(Array) 88 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 89 | end 90 | elsif !attributes[self.class.attribute_map[key]].nil? 91 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 92 | end # or else data not found in attributes(hash), not an issue as the data can be optional 93 | end 94 | 95 | self 96 | end 97 | 98 | # Deserializes the data based on type 99 | # @param string type Data type 100 | # @param string value Value to be deserialized 101 | # @return [Object] Deserialized data 102 | def _deserialize(type, value) 103 | case type.to_sym 104 | when :DateTime 105 | DateTime.parse(value) 106 | when :Date 107 | Date.parse(value) 108 | when :String 109 | value.to_s 110 | when :Integer 111 | value.to_i 112 | when :Float 113 | value.to_f 114 | when :BOOLEAN 115 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 116 | true 117 | else 118 | false 119 | end 120 | when :Object 121 | # generic object (usually a Hash), return directly 122 | value 123 | when /\AArray<(?.+)>\z/ 124 | inner_type = Regexp.last_match[:inner_type] 125 | value.map { |v| _deserialize(inner_type, v) } 126 | when /\AHash<(?.+?), (?.+)>\z/ 127 | k_type = Regexp.last_match[:k_type] 128 | v_type = Regexp.last_match[:v_type] 129 | {}.tap do |hash| 130 | value.each do |k, v| 131 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 132 | end 133 | end 134 | else # model 135 | temp_model = DocuSign_Rooms.const_get(type).new 136 | temp_model.build_from_hash(value) 137 | end 138 | end 139 | 140 | # Returns the string representation of the object 141 | # @return [String] String presentation of the object 142 | def to_s 143 | to_hash.to_s 144 | end 145 | 146 | # to_body is an alias to to_hash (backward compatibility) 147 | # @return [Hash] Returns the object in the form of hash 148 | def to_body 149 | to_hash 150 | end 151 | 152 | # Returns the object in the form of hash 153 | # @return [Hash] Returns the object in the form of hash 154 | def to_hash 155 | hash = {} 156 | self.class.attribute_map.each_pair do |attr, param| 157 | value = self.send(attr) 158 | next if value.nil? 159 | hash[param] = _to_hash(value) 160 | end 161 | hash 162 | end 163 | 164 | # Outputs non-array value in the form of hash 165 | # For object, use to_hash. Otherwise, just return the value 166 | # @param [Object] value Any valid value 167 | # @return [Hash] Returns the value in the form of hash 168 | def _to_hash(value) 169 | if value.is_a?(Array) 170 | value.compact.map { |v| _to_hash(v) } 171 | elsif value.is_a?(Hash) 172 | {}.tap do |hash| 173 | value.each { |k, v| hash[k] = _to_hash(v) } 174 | end 175 | elsif value.respond_to? :to_hash 176 | value.to_hash 177 | else 178 | value 179 | end 180 | end 181 | 182 | end 183 | end 184 | -------------------------------------------------------------------------------- /lib/docusign_rooms/models/global_contact_sides.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class GlobalContactSides 16 | attr_accessor :contact_sides 17 | 18 | # Attribute mapping from ruby-style variable name to JSON key. 19 | def self.attribute_map 20 | { 21 | :'contact_sides' => :'contactSides' 22 | } 23 | end 24 | 25 | # Attribute type mapping. 26 | def self.swagger_types 27 | { 28 | :'contact_sides' => :'Array' 29 | } 30 | end 31 | 32 | # Initializes the object 33 | # @param [Hash] attributes Model attributes in the form of hash 34 | def initialize(attributes = {}) 35 | return unless attributes.is_a?(Hash) 36 | 37 | # convert string to symbol for hash key 38 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 39 | 40 | if attributes.has_key?(:'contactSides') 41 | if (value = attributes[:'contactSides']).is_a?(Array) 42 | self.contact_sides = value 43 | end 44 | end 45 | end 46 | 47 | # Show invalid properties with the reasons. Usually used together with valid? 48 | # @return Array for valid properties with the reasons 49 | def list_invalid_properties 50 | invalid_properties = Array.new 51 | invalid_properties 52 | end 53 | 54 | # Check to see if the all the properties in the model are valid 55 | # @return true if the model is valid 56 | def valid? 57 | true 58 | end 59 | 60 | # Checks equality by comparing each attribute. 61 | # @param [Object] Object to be compared 62 | def ==(o) 63 | return true if self.equal?(o) 64 | self.class == o.class && 65 | contact_sides == o.contact_sides 66 | end 67 | 68 | # @see the `==` method 69 | # @param [Object] Object to be compared 70 | def eql?(o) 71 | self == o 72 | end 73 | 74 | # Calculates hash code according to all attributes. 75 | # @return [Fixnum] Hash code 76 | def hash 77 | [contact_sides].hash 78 | end 79 | 80 | # Builds the object from hash 81 | # @param [Hash] attributes Model attributes in the form of hash 82 | # @return [Object] Returns the model itself 83 | def build_from_hash(attributes) 84 | return nil unless attributes.is_a?(Hash) 85 | self.class.swagger_types.each_pair do |key, type| 86 | if type =~ /\AArray<(.*)>/i 87 | # check to ensure the input is an array given that the attribute 88 | # is documented as an array but the input is not 89 | if attributes[self.class.attribute_map[key]].is_a?(Array) 90 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 91 | end 92 | elsif !attributes[self.class.attribute_map[key]].nil? 93 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 94 | end # or else data not found in attributes(hash), not an issue as the data can be optional 95 | end 96 | 97 | self 98 | end 99 | 100 | # Deserializes the data based on type 101 | # @param string type Data type 102 | # @param string value Value to be deserialized 103 | # @return [Object] Deserialized data 104 | def _deserialize(type, value) 105 | case type.to_sym 106 | when :DateTime 107 | DateTime.parse(value) 108 | when :Date 109 | Date.parse(value) 110 | when :String 111 | value.to_s 112 | when :Integer 113 | value.to_i 114 | when :Float 115 | value.to_f 116 | when :BOOLEAN 117 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 118 | true 119 | else 120 | false 121 | end 122 | when :Object 123 | # generic object (usually a Hash), return directly 124 | value 125 | when /\AArray<(?.+)>\z/ 126 | inner_type = Regexp.last_match[:inner_type] 127 | value.map { |v| _deserialize(inner_type, v) } 128 | when /\AHash<(?.+?), (?.+)>\z/ 129 | k_type = Regexp.last_match[:k_type] 130 | v_type = Regexp.last_match[:v_type] 131 | {}.tap do |hash| 132 | value.each do |k, v| 133 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 134 | end 135 | end 136 | else # model 137 | temp_model = DocuSign_Rooms.const_get(type).new 138 | temp_model.build_from_hash(value) 139 | end 140 | end 141 | 142 | # Returns the string representation of the object 143 | # @return [String] String presentation of the object 144 | def to_s 145 | to_hash.to_s 146 | end 147 | 148 | # to_body is an alias to to_hash (backward compatibility) 149 | # @return [Hash] Returns the object in the form of hash 150 | def to_body 151 | to_hash 152 | end 153 | 154 | # Returns the object in the form of hash 155 | # @return [Hash] Returns the object in the form of hash 156 | def to_hash 157 | hash = {} 158 | self.class.attribute_map.each_pair do |attr, param| 159 | value = self.send(attr) 160 | next if value.nil? 161 | hash[param] = _to_hash(value) 162 | end 163 | hash 164 | end 165 | 166 | # Outputs non-array value in the form of hash 167 | # For object, use to_hash. Otherwise, just return the value 168 | # @param [Object] value Any valid value 169 | # @return [Hash] Returns the value in the form of hash 170 | def _to_hash(value) 171 | if value.is_a?(Array) 172 | value.compact.map { |v| _to_hash(v) } 173 | elsif value.is_a?(Hash) 174 | {}.tap do |hash| 175 | value.each { |k, v| hash[k] = _to_hash(v) } 176 | end 177 | elsif value.respond_to? :to_hash 178 | value.to_hash 179 | else 180 | value 181 | end 182 | end 183 | 184 | end 185 | end 186 | -------------------------------------------------------------------------------- /lib/docusign_rooms/models/global_task_statuses.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class GlobalTaskStatuses 16 | attr_accessor :task_statuses 17 | 18 | # Attribute mapping from ruby-style variable name to JSON key. 19 | def self.attribute_map 20 | { 21 | :'task_statuses' => :'taskStatuses' 22 | } 23 | end 24 | 25 | # Attribute type mapping. 26 | def self.swagger_types 27 | { 28 | :'task_statuses' => :'Array' 29 | } 30 | end 31 | 32 | # Initializes the object 33 | # @param [Hash] attributes Model attributes in the form of hash 34 | def initialize(attributes = {}) 35 | return unless attributes.is_a?(Hash) 36 | 37 | # convert string to symbol for hash key 38 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 39 | 40 | if attributes.has_key?(:'taskStatuses') 41 | if (value = attributes[:'taskStatuses']).is_a?(Array) 42 | self.task_statuses = value 43 | end 44 | end 45 | end 46 | 47 | # Show invalid properties with the reasons. Usually used together with valid? 48 | # @return Array for valid properties with the reasons 49 | def list_invalid_properties 50 | invalid_properties = Array.new 51 | invalid_properties 52 | end 53 | 54 | # Check to see if the all the properties in the model are valid 55 | # @return true if the model is valid 56 | def valid? 57 | true 58 | end 59 | 60 | # Checks equality by comparing each attribute. 61 | # @param [Object] Object to be compared 62 | def ==(o) 63 | return true if self.equal?(o) 64 | self.class == o.class && 65 | task_statuses == o.task_statuses 66 | end 67 | 68 | # @see the `==` method 69 | # @param [Object] Object to be compared 70 | def eql?(o) 71 | self == o 72 | end 73 | 74 | # Calculates hash code according to all attributes. 75 | # @return [Fixnum] Hash code 76 | def hash 77 | [task_statuses].hash 78 | end 79 | 80 | # Builds the object from hash 81 | # @param [Hash] attributes Model attributes in the form of hash 82 | # @return [Object] Returns the model itself 83 | def build_from_hash(attributes) 84 | return nil unless attributes.is_a?(Hash) 85 | self.class.swagger_types.each_pair do |key, type| 86 | if type =~ /\AArray<(.*)>/i 87 | # check to ensure the input is an array given that the attribute 88 | # is documented as an array but the input is not 89 | if attributes[self.class.attribute_map[key]].is_a?(Array) 90 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 91 | end 92 | elsif !attributes[self.class.attribute_map[key]].nil? 93 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 94 | end # or else data not found in attributes(hash), not an issue as the data can be optional 95 | end 96 | 97 | self 98 | end 99 | 100 | # Deserializes the data based on type 101 | # @param string type Data type 102 | # @param string value Value to be deserialized 103 | # @return [Object] Deserialized data 104 | def _deserialize(type, value) 105 | case type.to_sym 106 | when :DateTime 107 | DateTime.parse(value) 108 | when :Date 109 | Date.parse(value) 110 | when :String 111 | value.to_s 112 | when :Integer 113 | value.to_i 114 | when :Float 115 | value.to_f 116 | when :BOOLEAN 117 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 118 | true 119 | else 120 | false 121 | end 122 | when :Object 123 | # generic object (usually a Hash), return directly 124 | value 125 | when /\AArray<(?.+)>\z/ 126 | inner_type = Regexp.last_match[:inner_type] 127 | value.map { |v| _deserialize(inner_type, v) } 128 | when /\AHash<(?.+?), (?.+)>\z/ 129 | k_type = Regexp.last_match[:k_type] 130 | v_type = Regexp.last_match[:v_type] 131 | {}.tap do |hash| 132 | value.each do |k, v| 133 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 134 | end 135 | end 136 | else # model 137 | temp_model = DocuSign_Rooms.const_get(type).new 138 | temp_model.build_from_hash(value) 139 | end 140 | end 141 | 142 | # Returns the string representation of the object 143 | # @return [String] String presentation of the object 144 | def to_s 145 | to_hash.to_s 146 | end 147 | 148 | # to_body is an alias to to_hash (backward compatibility) 149 | # @return [Hash] Returns the object in the form of hash 150 | def to_body 151 | to_hash 152 | end 153 | 154 | # Returns the object in the form of hash 155 | # @return [Hash] Returns the object in the form of hash 156 | def to_hash 157 | hash = {} 158 | self.class.attribute_map.each_pair do |attr, param| 159 | value = self.send(attr) 160 | next if value.nil? 161 | hash[param] = _to_hash(value) 162 | end 163 | hash 164 | end 165 | 166 | # Outputs non-array value in the form of hash 167 | # For object, use to_hash. Otherwise, just return the value 168 | # @param [Object] value Any valid value 169 | # @return [Hash] Returns the value in the form of hash 170 | def _to_hash(value) 171 | if value.is_a?(Array) 172 | value.compact.map { |v| _to_hash(v) } 173 | elsif value.is_a?(Hash) 174 | {}.tap do |hash| 175 | value.each { |k, v| hash[k] = _to_hash(v) } 176 | end 177 | elsif value.respond_to? :to_hash 178 | value.to_hash 179 | else 180 | value 181 | end 182 | end 183 | 184 | end 185 | end 186 | -------------------------------------------------------------------------------- /lib/docusign_rooms/models/form_group_for_create.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign Rooms API - v2 3 | 4 | #An API for an integrator to access the features of DocuSign Rooms 5 | 6 | OpenAPI spec version: v2 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | require 'date' 13 | 14 | module DocuSign_Rooms 15 | class FormGroupForCreate 16 | attr_accessor :name 17 | 18 | # Attribute mapping from ruby-style variable name to JSON key. 19 | def self.attribute_map 20 | { 21 | :'name' => :'name' 22 | } 23 | end 24 | 25 | # Attribute type mapping. 26 | def self.swagger_types 27 | { 28 | :'name' => :'String' 29 | } 30 | end 31 | 32 | # Initializes the object 33 | # @param [Hash] attributes Model attributes in the form of hash 34 | def initialize(attributes = {}) 35 | return unless attributes.is_a?(Hash) 36 | 37 | # convert string to symbol for hash key 38 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 39 | 40 | if attributes.has_key?(:'name') 41 | self.name = attributes[:'name'] 42 | end 43 | end 44 | 45 | # Show invalid properties with the reasons. Usually used together with valid? 46 | # @return Array for valid properties with the reasons 47 | def list_invalid_properties 48 | invalid_properties = Array.new 49 | if @name.nil? 50 | invalid_properties.push('invalid value for "name", name cannot be nil.') 51 | end 52 | 53 | invalid_properties 54 | end 55 | 56 | # Check to see if the all the properties in the model are valid 57 | # @return true if the model is valid 58 | def valid? 59 | return false if @name.nil? 60 | true 61 | end 62 | 63 | # Checks equality by comparing each attribute. 64 | # @param [Object] Object to be compared 65 | def ==(o) 66 | return true if self.equal?(o) 67 | self.class == o.class && 68 | name == o.name 69 | end 70 | 71 | # @see the `==` method 72 | # @param [Object] Object to be compared 73 | def eql?(o) 74 | self == o 75 | end 76 | 77 | # Calculates hash code according to all attributes. 78 | # @return [Fixnum] Hash code 79 | def hash 80 | [name].hash 81 | end 82 | 83 | # Builds the object from hash 84 | # @param [Hash] attributes Model attributes in the form of hash 85 | # @return [Object] Returns the model itself 86 | def build_from_hash(attributes) 87 | return nil unless attributes.is_a?(Hash) 88 | self.class.swagger_types.each_pair do |key, type| 89 | if type =~ /\AArray<(.*)>/i 90 | # check to ensure the input is an array given that the attribute 91 | # is documented as an array but the input is not 92 | if attributes[self.class.attribute_map[key]].is_a?(Array) 93 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 94 | end 95 | elsif !attributes[self.class.attribute_map[key]].nil? 96 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 97 | end # or else data not found in attributes(hash), not an issue as the data can be optional 98 | end 99 | 100 | self 101 | end 102 | 103 | # Deserializes the data based on type 104 | # @param string type Data type 105 | # @param string value Value to be deserialized 106 | # @return [Object] Deserialized data 107 | def _deserialize(type, value) 108 | case type.to_sym 109 | when :DateTime 110 | DateTime.parse(value) 111 | when :Date 112 | Date.parse(value) 113 | when :String 114 | value.to_s 115 | when :Integer 116 | value.to_i 117 | when :Float 118 | value.to_f 119 | when :BOOLEAN 120 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 121 | true 122 | else 123 | false 124 | end 125 | when :Object 126 | # generic object (usually a Hash), return directly 127 | value 128 | when /\AArray<(?.+)>\z/ 129 | inner_type = Regexp.last_match[:inner_type] 130 | value.map { |v| _deserialize(inner_type, v) } 131 | when /\AHash<(?.+?), (?.+)>\z/ 132 | k_type = Regexp.last_match[:k_type] 133 | v_type = Regexp.last_match[:v_type] 134 | {}.tap do |hash| 135 | value.each do |k, v| 136 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 137 | end 138 | end 139 | else # model 140 | temp_model = DocuSign_Rooms.const_get(type).new 141 | temp_model.build_from_hash(value) 142 | end 143 | end 144 | 145 | # Returns the string representation of the object 146 | # @return [String] String presentation of the object 147 | def to_s 148 | to_hash.to_s 149 | end 150 | 151 | # to_body is an alias to to_hash (backward compatibility) 152 | # @return [Hash] Returns the object in the form of hash 153 | def to_body 154 | to_hash 155 | end 156 | 157 | # Returns the object in the form of hash 158 | # @return [Hash] Returns the object in the form of hash 159 | def to_hash 160 | hash = {} 161 | self.class.attribute_map.each_pair do |attr, param| 162 | value = self.send(attr) 163 | next if value.nil? 164 | hash[param] = _to_hash(value) 165 | end 166 | hash 167 | end 168 | 169 | # Outputs non-array value in the form of hash 170 | # For object, use to_hash. Otherwise, just return the value 171 | # @param [Object] value Any valid value 172 | # @return [Hash] Returns the value in the form of hash 173 | def _to_hash(value) 174 | if value.is_a?(Array) 175 | value.compact.map { |v| _to_hash(v) } 176 | elsif value.is_a?(Hash) 177 | {}.tap do |hash| 178 | value.each { |k, v| hash[k] = _to_hash(v) } 179 | end 180 | elsif value.respond_to? :to_hash 181 | value.to_hash 182 | else 183 | value 184 | end 185 | end 186 | 187 | end 188 | end 189 | --------------------------------------------------------------------------------