├── .gitignore ├── .rspec ├── .rubocop.yml ├── .swagger-codegen-ignore ├── .swagger-codegen └── VERSION ├── .travis.yml ├── CHANGELOG.md ├── Gemfile ├── LICENSE ├── README.md ├── Rakefile ├── docusign_esign.gemspec ├── git_push.sh ├── lib ├── docusign_esign.rb └── docusign_esign │ ├── api │ ├── accounts_api.rb │ ├── authentication_api.rb │ ├── billing_api.rb │ ├── bulk_envelopes_api.rb │ ├── bulk_process_data_api.rb │ ├── bulk_process_data_send_api.rb │ ├── cloud_storage_api.rb │ ├── connect_api.rb │ ├── custom_tabs_api.rb │ ├── data_feed_api.rb │ ├── diagnostics_api.rb │ ├── email_archive_api.rb │ ├── envelopes_api.rb │ ├── folders_api.rb │ ├── groups_api.rb │ ├── notary_api.rb │ ├── organizations_api.rb │ ├── power_forms_api.rb │ ├── signature_api.rb │ ├── signing_groups_api.rb │ ├── templates_api.rb │ ├── trust_service_providers_api.rb │ ├── tsps_api.rb │ ├── users_api.rb │ └── workspaces_api.rb │ ├── client │ ├── api_client.rb │ ├── api_error.rb │ └── auth │ │ └── oauth.rb │ ├── configuration.rb │ ├── models │ ├── access_code_format.rb │ ├── account_address.rb │ ├── account_billing_plan.rb │ ├── account_billing_plan_response.rb │ ├── account_identity_input_option.rb │ ├── account_identity_verification_response.rb │ ├── account_identity_verification_step.rb │ ├── account_identity_verification_workflow.rb │ ├── account_information.rb │ ├── account_minimum_password_length.rb │ ├── account_notification.rb │ ├── account_password_expire_password_days.rb │ ├── account_password_lockout_duration_minutes.rb │ ├── account_password_lockout_duration_type.rb │ ├── account_password_minimum_password_age_days.rb │ ├── account_password_questions_required.rb │ ├── account_password_rules.rb │ ├── account_password_strength_type.rb │ ├── account_password_strength_type_option.rb │ ├── account_role_settings.rb │ ├── account_seals.rb │ ├── account_settings_information.rb │ ├── account_shared_access.rb │ ├── account_signature.rb │ ├── account_signature_definition.rb │ ├── account_signature_provider.rb │ ├── account_signature_provider_option.rb │ ├── account_signature_providers.rb │ ├── account_signatures_information.rb │ ├── account_ui_settings.rb │ ├── add_on.rb │ ├── address_information.rb │ ├── address_information_input.rb │ ├── admin_message.rb │ ├── agent.rb │ ├── api_request_log.rb │ ├── api_request_logs_result.rb │ ├── app_store_product.rb │ ├── app_store_receipt.rb │ ├── approve.rb │ ├── ask_an_admin.rb │ ├── attachment.rb │ ├── authentication_method.rb │ ├── authentication_status.rb │ ├── authorization_user.rb │ ├── bcc_email_address.rb │ ├── bcc_email_archive.rb │ ├── bcc_email_archive_history.rb │ ├── bcc_email_archive_history_list.rb │ ├── bcc_email_archive_list.rb │ ├── billing_charge.rb │ ├── billing_charge_response.rb │ ├── billing_discount.rb │ ├── billing_entity_information_response.rb │ ├── billing_invoice.rb │ ├── billing_invoice_item.rb │ ├── billing_invoices_response.rb │ ├── billing_invoices_summary.rb │ ├── billing_payment.rb │ ├── billing_payment_item.rb │ ├── billing_payment_request.rb │ ├── billing_payment_response.rb │ ├── billing_payments_response.rb │ ├── billing_plan.rb │ ├── billing_plan_information.rb │ ├── billing_plan_preview.rb │ ├── billing_plan_response.rb │ ├── billing_plan_update_response.rb │ ├── billing_plans_response.rb │ ├── billing_price.rb │ ├── brand.rb │ ├── brand_email_content.rb │ ├── brand_link.rb │ ├── brand_logos.rb │ ├── brand_request.rb │ ├── brand_resource_urls.rb │ ├── brand_resources.rb │ ├── brand_resources_list.rb │ ├── brands_request.rb │ ├── brands_response.rb │ ├── bulk_envelope.rb │ ├── bulk_envelope_status.rb │ ├── bulk_envelopes_response.rb │ ├── bulk_process_request.rb │ ├── bulk_process_response.rb │ ├── bulk_process_result.rb │ ├── bulk_processing_list_summaries.rb │ ├── bulk_processing_list_summary.rb │ ├── bulk_processing_lists.rb │ ├── bulk_recipient.rb │ ├── bulk_recipient_signature_provider.rb │ ├── bulk_recipient_tab_label.rb │ ├── bulk_recipients_request.rb │ ├── bulk_recipients_response.rb │ ├── bulk_recipients_summary_response.rb │ ├── bulk_recipients_update_response.rb │ ├── bulk_send_batch_action_request.rb │ ├── bulk_send_batch_error.rb │ ├── bulk_send_batch_request.rb │ ├── bulk_send_batch_status.rb │ ├── bulk_send_batch_summaries.rb │ ├── bulk_send_batch_summary.rb │ ├── bulk_send_envelopes_info.rb │ ├── bulk_send_error_status.rb │ ├── bulk_send_request.rb │ ├── bulk_send_response.rb │ ├── bulk_send_test_response.rb │ ├── bulk_sending_copy.rb │ ├── bulk_sending_copy_custom_field.rb │ ├── bulk_sending_copy_doc_gen_form_field_row_value.rb │ ├── bulk_sending_copy_recipient.rb │ ├── bulk_sending_copy_tab.rb │ ├── bulk_sending_list.rb │ ├── bulk_sending_list_summaries.rb │ ├── bulk_sending_list_summary.rb │ ├── bulksending_copy_doc_gen_form_field.rb │ ├── captive_recipient.rb │ ├── captive_recipient_information.rb │ ├── carbon_copy.rb │ ├── certified_delivery.rb │ ├── checkbox.rb │ ├── chunked_upload_part.rb │ ├── chunked_upload_request.rb │ ├── chunked_upload_response.rb │ ├── cloud_storage_provider.rb │ ├── cloud_storage_providers.rb │ ├── comment.rb │ ├── comment_history_result.rb │ ├── comment_publish.rb │ ├── comment_thread.rb │ ├── comments_publish.rb │ ├── commission_county.rb │ ├── commission_expiration.rb │ ├── commission_number.rb │ ├── commission_state.rb │ ├── company.rb │ ├── complete_sign_hash_response.rb │ ├── complete_sign_request.rb │ ├── composite_template.rb │ ├── conditional_recipient_rule.rb │ ├── conditional_recipient_rule_condition.rb │ ├── conditional_recipient_rule_filter.rb │ ├── connect_config_results.rb │ ├── connect_custom_configuration.rb │ ├── connect_debug_log.rb │ ├── connect_delete_failure_result.rb │ ├── connect_event_data.rb │ ├── connect_failure_filter.rb │ ├── connect_failure_result.rb │ ├── connect_failure_results.rb │ ├── connect_historical_envelope_republish.rb │ ├── connect_log.rb │ ├── connect_logs.rb │ ├── connect_o_auth_config.rb │ ├── connect_salesforce_field.rb │ ├── connect_salesforce_object.rb │ ├── connect_user_info.rb │ ├── connect_user_object.rb │ ├── connected_data.rb │ ├── connected_object_details.rb │ ├── connection_instance.rb │ ├── consent_details.rb │ ├── console_view_request.rb │ ├── consumer_disclosure.rb │ ├── contact.rb │ ├── contact_get_response.rb │ ├── contact_mod_request.rb │ ├── contact_phone_number.rb │ ├── contact_update_response.rb │ ├── correct_view_request.rb │ ├── country.rb │ ├── credential.rb │ ├── credit_card_information.rb │ ├── credit_card_types.rb │ ├── currency.rb │ ├── currency_feature_set_price.rb │ ├── currency_plan_price.rb │ ├── custom_field.rb │ ├── custom_fields.rb │ ├── custom_fields_envelope.rb │ ├── custom_settings_information.rb │ ├── date.rb │ ├── date_signed.rb │ ├── date_stamp_properties.rb │ ├── decline.rb │ ├── delayed_routing.rb │ ├── delayed_routing_api_model.rb │ ├── delegation_info.rb │ ├── diagnostics_settings_information.rb │ ├── direct_debit_processor_information.rb │ ├── display_appliance_account.rb │ ├── display_appliance_info.rb │ ├── display_appliance_pdf.rb │ ├── display_appliance_signer_attachment.rb │ ├── dob_information_input.rb │ ├── doc_gen_form_field.rb │ ├── doc_gen_form_field_option.rb │ ├── doc_gen_form_field_request.rb │ ├── doc_gen_form_field_response.rb │ ├── doc_gen_form_field_row_value.rb │ ├── doc_gen_form_field_validation.rb │ ├── doc_gen_form_fields.rb │ ├── doc_gen_syntax_error.rb │ ├── document.rb │ ├── document_fields_information.rb │ ├── document_html_collapsible_display_settings.rb │ ├── document_html_definition.rb │ ├── document_html_definition_original.rb │ ├── document_html_definition_originals.rb │ ├── document_html_definitions.rb │ ├── document_html_display_anchor.rb │ ├── document_html_display_settings.rb │ ├── document_security_store.rb │ ├── document_template.rb │ ├── document_template_list.rb │ ├── document_update_info.rb │ ├── document_visibility.rb │ ├── document_visibility_list.rb │ ├── downgrad_request_billing_info_response.rb │ ├── downgrade_billing_plan_information.rb │ ├── downgrade_plan_update_response.rb │ ├── downgrade_request_information.rb │ ├── draw.rb │ ├── e_note_configuration.rb │ ├── editor.rb │ ├── email.rb │ ├── email_address.rb │ ├── email_settings.rb │ ├── envelope.rb │ ├── envelope_attachment.rb │ ├── envelope_attachments_request.rb │ ├── envelope_attachments_result.rb │ ├── envelope_audit_event.rb │ ├── envelope_audit_event_response.rb │ ├── envelope_custom_metadata.rb │ ├── envelope_definition.rb │ ├── envelope_delay_rule.rb │ ├── envelope_delay_rule_api_model.rb │ ├── envelope_document.rb │ ├── envelope_documents_result.rb │ ├── envelope_event.rb │ ├── envelope_form_data.rb │ ├── envelope_form_data_prefill_form_data.rb │ ├── envelope_id.rb │ ├── envelope_ids_request.rb │ ├── envelope_metadata.rb │ ├── envelope_notification_request.rb │ ├── envelope_publish_transaction.rb │ ├── envelope_publish_transaction_error_rollup.rb │ ├── envelope_purge_configuration.rb │ ├── envelope_summary.rb │ ├── envelope_template.rb │ ├── envelope_template_results.rb │ ├── envelope_transaction_status.rb │ ├── envelope_transfer_rule.rb │ ├── envelope_transfer_rule_information.rb │ ├── envelope_transfer_rule_request.rb │ ├── envelope_update_summary.rb │ ├── envelope_view_document_settings.rb │ ├── envelope_view_envelope_custom_field_settings.rb │ ├── envelope_view_recipient_settings.rb │ ├── envelope_view_request.rb │ ├── envelope_view_settings.rb │ ├── envelope_view_tagger_settings.rb │ ├── envelope_view_template_settings.rb │ ├── envelopes_information.rb │ ├── error_details.rb │ ├── event_notification.rb │ ├── event_result.rb │ ├── expirations.rb │ ├── extension_data.rb │ ├── external_claim.rb │ ├── external_doc_service_error_details.rb │ ├── external_document_sources.rb │ ├── external_file.rb │ ├── external_folder.rb │ ├── external_primary_account_recipient_auth_requirements.rb │ ├── favorite_templates_content_item.rb │ ├── favorite_templates_info.rb │ ├── feature_available_metadata.rb │ ├── feature_set.rb │ ├── file_type.rb │ ├── file_type_list.rb │ ├── filter.rb │ ├── first_name.rb │ ├── folder.rb │ ├── folder_item_response.rb │ ├── folder_item_v2.rb │ ├── folder_items_response.rb │ ├── folder_shared_item.rb │ ├── folders_request.rb │ ├── folders_response.rb │ ├── forgotten_password_information.rb │ ├── form_data_item.rb │ ├── formula_tab.rb │ ├── full_name.rb │ ├── graphics_context.rb │ ├── group.rb │ ├── group_brands.rb │ ├── group_information.rb │ ├── id_check_configuration.rb │ ├── id_check_information_input.rb │ ├── id_check_security_step.rb │ ├── id_evidence_resource_token.rb │ ├── id_evidence_view_link.rb │ ├── in_person_signer.rb │ ├── initial_here.rb │ ├── inline_template.rb │ ├── integrated_connect_user_info_list.rb │ ├── integrated_user_info_list.rb │ ├── intermediary.rb │ ├── jurisdiction.rb │ ├── jurisdiction_summary.rb │ ├── last_name.rb │ ├── linked_external_primary_account.rb │ ├── list.rb │ ├── list_custom_field.rb │ ├── list_item.rb │ ├── locale_policy.rb │ ├── locale_policy_tab.rb │ ├── lock_information.rb │ ├── lock_request.rb │ ├── login_account.rb │ ├── login_information.rb │ ├── match_box.rb │ ├── member_group_shared_item.rb │ ├── member_shared_items.rb │ ├── merge_field.rb │ ├── mobile_notifier_configuration.rb │ ├── mobile_notifier_configuration_information.rb │ ├── money.rb │ ├── name_value.rb │ ├── new_account_definition.rb │ ├── new_account_summary.rb │ ├── new_user.rb │ ├── new_users_definition.rb │ ├── new_users_summary.rb │ ├── notarize.rb │ ├── notary.rb │ ├── notary_certificate.rb │ ├── notary_contact_details.rb │ ├── notary_host.rb │ ├── notary_journal.rb │ ├── notary_journal_credible_witness.rb │ ├── notary_journal_list.rb │ ├── notary_journal_meta_data.rb │ ├── notary_jurisdiction.rb │ ├── notary_jurisdiction_list.rb │ ├── notary_recipient.rb │ ├── notary_result.rb │ ├── notary_seal.rb │ ├── note.rb │ ├── notification.rb │ ├── notification_default_settings.rb │ ├── notification_defaults.rb │ ├── number.rb │ ├── numerical.rb │ ├── oauth_access.rb │ ├── ocr_request.rb │ ├── offline_attributes.rb │ ├── page.rb │ ├── page_images.rb │ ├── page_request.rb │ ├── page_size.rb │ ├── palette_item_settings.rb │ ├── palette_settings.rb │ ├── participant.rb │ ├── path_extended_element.rb │ ├── pay_pal_legacy_settings.rb │ ├── payment_details.rb │ ├── payment_gateway_account.rb │ ├── payment_gateway_account_setting.rb │ ├── payment_gateway_accounts_info.rb │ ├── payment_line_item.rb │ ├── payment_method_with_options.rb │ ├── payment_processor_information.rb │ ├── payment_signer_values.rb │ ├── permission_profile.rb │ ├── permission_profile_information.rb │ ├── phone_number.rb │ ├── plan_information.rb │ ├── poly_line.rb │ ├── poly_line_overlay.rb │ ├── power_form.rb │ ├── power_form_form_data_envelope.rb │ ├── power_form_form_data_recipient.rb │ ├── power_form_recipient.rb │ ├── power_form_senders_response.rb │ ├── power_forms_form_data_response.rb │ ├── power_forms_request.rb │ ├── power_forms_response.rb │ ├── prefill_form_data.rb │ ├── prefill_tabs.rb │ ├── proof_service_resource_token.rb │ ├── proof_service_view_link.rb │ ├── property_metadata.rb │ ├── province.rb │ ├── provisioning_information.rb │ ├── purchased_envelopes_information.rb │ ├── radio.rb │ ├── radio_group.rb │ ├── recipient_additional_notification.rb │ ├── recipient_attachment.rb │ ├── recipient_domain.rb │ ├── recipient_email_notification.rb │ ├── recipient_event.rb │ ├── recipient_form_data.rb │ ├── recipient_group.rb │ ├── recipient_identity_input_option.rb │ ├── recipient_identity_phone_number.rb │ ├── recipient_identity_verification.rb │ ├── recipient_names_response.rb │ ├── recipient_option.rb │ ├── recipient_phone_authentication.rb │ ├── recipient_phone_number.rb │ ├── recipient_preview_request.rb │ ├── recipient_proof_file.rb │ ├── recipient_routing.rb │ ├── recipient_rules.rb │ ├── recipient_signature_information.rb │ ├── recipient_signature_provider.rb │ ├── recipient_signature_provider_options.rb │ ├── recipient_sms_authentication.rb │ ├── recipient_token_client_ur_ls.rb │ ├── recipient_update_response.rb │ ├── recipient_view_request.rb │ ├── recipients.rb │ ├── recipients_update_summary.rb │ ├── referral_information.rb │ ├── reminders.rb │ ├── report_in_product_csv_run_request.rb │ ├── report_in_product_field.rb │ ├── report_in_product_get.rb │ ├── report_in_product_list.rb │ ├── report_in_product_list_item.rb │ ├── report_in_product_run_request.rb │ ├── report_in_product_run_response.rb │ ├── report_in_product_run_response_row.rb │ ├── report_in_product_run_response_row_fields.rb │ ├── report_in_product_save_response.rb │ ├── report_in_product_sent_by_details.rb │ ├── reserved_domain_existence.rb │ ├── resource_information.rb │ ├── return_url_request.rb │ ├── revision.rb │ ├── scheduled_sending.rb │ ├── scheduled_sending_api_model.rb │ ├── seal.rb │ ├── seal_identifier.rb │ ├── seal_sign.rb │ ├── seat_discount.rb │ ├── sender.rb │ ├── sender_company.rb │ ├── sender_email_notifications.rb │ ├── sender_name.rb │ ├── server_template.rb │ ├── service_information.rb │ ├── service_version.rb │ ├── settings_metadata.rb │ ├── shared_item.rb │ ├── sign_hash_document.rb │ ├── sign_hash_session_info_response.rb │ ├── sign_here.rb │ ├── sign_session_info_request.rb │ ├── signature_data_info.rb │ ├── signature_group.rb │ ├── signature_group_def.rb │ ├── signature_properties.rb │ ├── signature_provider_required_option.rb │ ├── signature_type.rb │ ├── signature_user.rb │ ├── signature_user_def.rb │ ├── signer.rb │ ├── signer_attachment.rb │ ├── signer_email_notifications.rb │ ├── signing_group.rb │ ├── signing_group_information.rb │ ├── signing_group_user.rb │ ├── signing_group_users.rb │ ├── smart_contract_information.rb │ ├── smart_section.rb │ ├── smart_section_anchor_position.rb │ ├── smart_section_collapsible_display_settings.rb │ ├── smart_section_display_settings.rb │ ├── social_account_information.rb │ ├── social_authentication.rb │ ├── ssn.rb │ ├── ssn4_information_input.rb │ ├── ssn9_information_input.rb │ ├── stamp.rb │ ├── supported_languages.rb │ ├── tab_account_settings.rb │ ├── tab_group.rb │ ├── tab_metadata.rb │ ├── tab_metadata_list.rb │ ├── tabs.rb │ ├── template_auto_match.rb │ ├── template_auto_match_list.rb │ ├── template_custom_fields.rb │ ├── template_document_visibility_list.rb │ ├── template_documents_result.rb │ ├── template_information.rb │ ├── template_match.rb │ ├── template_notification_request.rb │ ├── template_recipients.rb │ ├── template_role.rb │ ├── template_shared_item.rb │ ├── template_summary.rb │ ├── template_tabs.rb │ ├── template_update_summary.rb │ ├── template_view_request.rb │ ├── text.rb │ ├── text_custom_field.rb │ ├── time_stamp_field.rb │ ├── title.rb │ ├── tsp_health_check_request.rb │ ├── tsp_health_check_status_description.rb │ ├── update_transaction_request.rb │ ├── update_transaction_response.rb │ ├── usage_history.rb │ ├── user.rb │ ├── user_account_management_granular_information.rb │ ├── user_authorization.rb │ ├── user_authorization_create_request.rb │ ├── user_authorization_create_request_with_id.rb │ ├── user_authorization_id_with_status.rb │ ├── user_authorization_update_request.rb │ ├── user_authorization_with_status.rb │ ├── user_authorizations.rb │ ├── user_authorizations_delete_request.rb │ ├── user_authorizations_delete_response.rb │ ├── user_authorizations_request.rb │ ├── user_authorizations_response.rb │ ├── user_info.rb │ ├── user_info_list.rb │ ├── user_info_response.rb │ ├── user_information.rb │ ├── user_information_list.rb │ ├── user_password_information.rb │ ├── user_password_rules.rb │ ├── user_profile.rb │ ├── user_settings_information.rb │ ├── user_shared_item.rb │ ├── user_signature.rb │ ├── user_signature_definition.rb │ ├── user_signatures_information.rb │ ├── user_social_id_result.rb │ ├── users_response.rb │ ├── view.rb │ ├── view_url.rb │ ├── watermark.rb │ ├── witness.rb │ ├── workflow.rb │ ├── workflow_step.rb │ ├── workspace.rb │ ├── workspace_folder_contents.rb │ ├── workspace_item.rb │ ├── workspace_item_list.rb │ ├── workspace_list.rb │ ├── workspace_settings.rb │ ├── workspace_user.rb │ ├── workspace_user_authorization.rb │ └── zip.rb │ └── version.rb ├── runLinter.sh └── tests ├── Gemfile ├── docs └── Test.pdf └── spec └── unit_tests_using_jwt_spec.rb /.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.* -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | --require spec_helper 3 | --debuger 4 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /.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 | CHANGELOG.md 29 | best_practices.md 30 | 31 | 32 | # Project files 33 | LICENSE 34 | .travis.yml 35 | Gemfile 36 | Gemfile.lock 37 | Rakefile 38 | 39 | # Specific src and test files 40 | .rspec 41 | docs/ 42 | spec/ 43 | tests/ 44 | -------------------------------------------------------------------------------- /.swagger-codegen/VERSION: -------------------------------------------------------------------------------- 1 | 2.4.21 -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gemspec 4 | 5 | group :development, :test do 6 | gem 'rake', '~> 12.3.3' 7 | end 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # The Official Docusign eSignature Ruby Client SDK 2 | 3 | The Docusign SDK makes integrating Docusign into your apps and websites a seamless experience. 4 | 5 | ## Table of Contents 6 | - [Introduction](#introduction) 7 | - [Installation](#installation) 8 | * [Version Information](#versionInformation) 9 | * [Requirements](#requirements) 10 | * [Compatibility](#compatibility) 11 | * [Installation via your application's Gemfile](#installationViaGem) 12 | * [Manual Installation](#manualInstallation) 13 | - [Dependencies](#dependencies) 14 | - [API Reference](#apiReference) 15 | - [Code Examples](#codeExamples) 16 | - [OAuth Implementations](#oauthImplementations) 17 | - [Changelog](#changeLog) 18 | - [Support](#support) 19 | - [License](#license) 20 | - [Additional Resources](#additionalResources) 21 | 22 | 23 | ## Introduction 24 | Integrate eSignatures into your application in minutes. The secure and award-winning Docusign eSignature API makes requesting signatures, automating forms, and tracking documents directly from your app easy. 25 | 26 | 27 | ## Installation 28 | This client SDK is provided as open source, which enables you to customize its functionality to suit your particular use case. To do so, download or clone the repository. If the SDK’s given functionality meets your integration needs, or if you’re working through our [code examples](https://developers.docusign.com/docs/esign-rest-api/how-to/) from the [Docusign Developer Center](https://developers.docusign.com/), you merely need to install it by following the instructions below. 29 | 30 | 31 | ### Version Information 32 | - **API version**: v2.1 33 | - **Latest SDK version**: 5.2.0 34 | 35 | 36 | ## Requirements 37 | * Ruby 1.9+ 38 | * Free [developer account](https://go.docusign.com/o/sandbox/?postActivateUrl=https://developers.docusign.com/) 39 | 40 | 41 | ## Compatibility 42 | * Ruby 1.9+ 43 | 44 | 45 | ### Installation via your application's Gemfile: 46 | 1. In your application's Gemfile, add: 47 | `gem 'docusign_esign'` 48 | 2. Open your preferred console. 49 | 3. In your project directory, execute the installer by typing: **bundle install** 50 | 51 | 52 | ### Manual Installation: 53 | 1. Open your preferred console. 54 | 2. In the console, type: **gem install docusign_esign** 55 | 56 | 57 | ### SDK Dependencies 58 | This client has the following external dependencies: 59 | * Jwt v2.2.1 60 | * Json v2.1.0 61 | * addressable v2.7.0 62 | * Typhoeus v1.0.1 63 | 64 | 65 | ## API Reference 66 | You can refer to the API reference [here](https://developers.docusign.com/docs/esign-rest-api/reference/). 67 | 68 | 69 | ## Code examples 70 | Explore our GitHub repository for the [Launcher](https://github.com/docusign/code-examples-ruby/), a self-executing package housing code examples for the eSignature Ruby SDK. This package showcases several common use cases and their respective source files. Additionally, you can download a version preconfigured for your Docusign developer account from [Quickstart](https://developers.docusign.com/docs/esign-rest-api/quickstart/). These examples support both the [Authorization Code Grant](https://developers.docusign.com/platform/auth/authcode/) and [JSON Web Token (JWT)](https://developers.docusign.com/platform/auth/jwt/) authentication workflows. 71 | 72 | 73 | ## OAuth implementations 74 | For details regarding which type of OAuth grant will work best for your Docusign integration, see [Choose OAuth Type](https://developers.docusign.com/platform/auth/choose/) in the [Docusign Developer Center](https://developers.docusign.com/). 75 | 76 | For security purposes, Docusign recommends using the [Authorization Code Grant](https://developers.docusign.com/platform/auth/authcode/) flow. 77 | 78 | 79 | ## Changelog 80 | You can refer to the complete changelog [here](https://github.com/docusign/docusign-esign-ruby-client/blob/master/CHANGELOG.md). 81 | 82 | 83 | ## Support 84 | Log issues against this client SDK through GitHub. You can also reach out to us through [Docusign Community](https://community.docusign.com/developer-59) and [Stack Overflow](https://stackoverflow.com/questions/tagged/docusignapi). 85 | 86 | 87 | ## License 88 | The Docusign eSignature Ruby Client SDK is licensed under the [MIT License](https://github.com/docusign/docusign-esign-ruby-client/blob/master/LICENSE). 89 | 90 | 91 | ### Additional resources 92 | * [Docusign Developer Center](https://developers.docusign.com/) 93 | * [Docusign API on Twitter](https://twitter.com/docusignapi) 94 | * [Docusign For Developers on LinkedIn](https://www.linkedin.com/showcase/docusign-for-developers/) 95 | * [Docusign For Developers on YouTube](https://www.youtube.com/channel/UCJSJ2kMs_qeQotmw4-lX2NQ) -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /docusign_esign.gemspec: -------------------------------------------------------------------------------- 1 | # -*- encoding: utf-8 -*- 2 | 3 | =begin 4 | #Docusign eSignature REST API 5 | 6 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 7 | 8 | OpenAPI spec version: v2.1 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_esign/version" 16 | 17 | Gem::Specification.new do |s| 18 | s.name = "docusign_esign" 19 | s.version = DocuSign_eSign::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-esign-ruby-client" 24 | s.summary = "Docusign eSignature REST API 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-esign-ruby-client repository. Join the eSign revolution!" 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 -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/docusign_esign/api/data_feed_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign REST API 3 | 4 | #The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | 16 | 17 | class DataFeedApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = DataFeedApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Retrieves a Datafeed element by Id. 25 | # 26 | # @param account_id The external account number (int) or account ID Guid. 27 | # @param data_feed_element_id 28 | # @return [nil] 29 | def get_data_feed_element(account_id, data_feed_element_id) 30 | get_data_feed_element_with_http_info(account_id, data_feed_element_id) 31 | return nil 32 | end 33 | 34 | # Retrieves a Datafeed element by Id. 35 | # 36 | # @param account_id The external account number (int) or account ID Guid. 37 | # @param data_feed_element_id 38 | # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers 39 | def get_data_feed_element_with_http_info(account_id, data_feed_element_id) 40 | if @api_client.config.debugging 41 | @api_client.config.logger.debug "Calling API: DataFeedApi.get_data_feed_element ..." 42 | end 43 | # verify the required parameter 'account_id' is set 44 | fail ArgumentError, "Missing the required parameter 'account_id' when calling DataFeedApi.get_data_feed_element" if account_id.nil? 45 | # verify the required parameter 'data_feed_element_id' is set 46 | fail ArgumentError, "Missing the required parameter 'data_feed_element_id' when calling DataFeedApi.get_data_feed_element" if data_feed_element_id.nil? 47 | # resource path 48 | local_var_path = "/v2.1/accounts/{accountId}/data_feeds/data/{dataFeedElementId}".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s).sub('{' + 'dataFeedElementId' + '}', data_feed_element_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(['application/json']) 57 | 58 | # form parameters 59 | form_params = {} 60 | 61 | # http body (model) 62 | post_body = nil 63 | auth_names = [] 64 | data, status_code, headers = @api_client.call_api(:GET, 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 | if @api_client.config.debugging 71 | @api_client.config.logger.debug "API called: DataFeedApi#get_data_feed_element\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 72 | end 73 | return data, status_code, headers 74 | end 75 | end 76 | end -------------------------------------------------------------------------------- /lib/docusign_esign/api/organizations_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | 16 | 17 | class OrganizationsApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = OrganizationsApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Retrieves org level report by correlation id and site. 25 | # 26 | # @param organization_id 27 | # @param report_correlation_id 28 | # @return [nil] 29 | def get_report_v2(organization_id, report_correlation_id) 30 | get_report_v2_with_http_info(organization_id, report_correlation_id) 31 | return nil 32 | end 33 | 34 | # Retrieves org level report by correlation id and site. 35 | # 36 | # @param organization_id 37 | # @param report_correlation_id 38 | # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers 39 | def get_report_v2_with_http_info(organization_id, report_correlation_id) 40 | if @api_client.config.debugging 41 | @api_client.config.logger.debug "Calling API: OrganizationsApi.get_report_v2 ..." 42 | end 43 | # verify the required parameter 'organization_id' is set 44 | fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationsApi.get_report_v2" if organization_id.nil? 45 | # verify the required parameter 'report_correlation_id' is set 46 | fail ArgumentError, "Missing the required parameter 'report_correlation_id' when calling OrganizationsApi.get_report_v2" if report_correlation_id.nil? 47 | # resource path 48 | local_var_path = "/v2.1/organization_reporting/{organizationId}/reportsv2/{reportCorrelationId}".sub('{format}','json').sub('{' + 'organizationId' + '}', organization_id.to_s).sub('{' + 'reportCorrelationId' + '}', report_correlation_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(['application/json']) 57 | 58 | # form parameters 59 | form_params = {} 60 | 61 | # http body (model) 62 | post_body = nil 63 | auth_names = [] 64 | data, status_code, headers = @api_client.call_api(:GET, 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 | if @api_client.config.debugging 71 | @api_client.config.logger.debug "API called: OrganizationsApi#get_report_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 72 | end 73 | return data, status_code, headers 74 | end 75 | end 76 | end -------------------------------------------------------------------------------- /lib/docusign_esign/api/trust_service_providers_api.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | 16 | 17 | class TrustServiceProvidersApi 18 | attr_accessor :api_client 19 | 20 | def initialize(api_client = TrustServiceProvidersApi.default) 21 | @api_client = api_client 22 | end 23 | 24 | # Returns Account available seals for specified account. 25 | # 26 | # @param account_id The external account number (int) or account ID Guid. 27 | # @return [AccountSeals] 28 | def get_seal_providers(account_id) 29 | data, _status_code, _headers = get_seal_providers_with_http_info(account_id) 30 | return data 31 | end 32 | 33 | # Returns Account available seals for specified account. 34 | # 35 | # @param account_id The external account number (int) or account ID Guid. 36 | # @return [Array<(AccountSeals, Fixnum, Hash)>] AccountSeals data, response status code and response headers 37 | def get_seal_providers_with_http_info(account_id) 38 | if @api_client.config.debugging 39 | @api_client.config.logger.debug "Calling API: TrustServiceProvidersApi.get_seal_providers ..." 40 | end 41 | # verify the required parameter 'account_id' is set 42 | fail ArgumentError, "Missing the required parameter 'account_id' when calling TrustServiceProvidersApi.get_seal_providers" if account_id.nil? 43 | # resource path 44 | local_var_path = "/v2.1/accounts/{accountId}/seals".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(['application/json']) 53 | 54 | # form parameters 55 | form_params = {} 56 | 57 | # http body (model) 58 | post_body = nil 59 | auth_names = [] 60 | data, status_code, headers = @api_client.call_api(:GET, local_var_path, 61 | :header_params => header_params, 62 | :query_params => query_params, 63 | :form_params => form_params, 64 | :body => post_body, 65 | :auth_names => auth_names, 66 | :return_type => 'AccountSeals') 67 | if @api_client.config.debugging 68 | @api_client.config.logger.debug "API called: TrustServiceProvidersApi#get_seal_providers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" 69 | end 70 | return data, status_code, headers 71 | end 72 | end 73 | end -------------------------------------------------------------------------------- /lib/docusign_esign/client/api_error.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | module DocuSign_eSign 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_esign/models/account_password_lockout_duration_type.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class AccountPasswordLockoutDurationType 16 | # 17 | attr_accessor :options 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'options' => :'options' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'options' => :'Array' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'options') 42 | if (value = attributes[:'options']).is_a?(Array) 43 | self.options = value 44 | end 45 | end 46 | end 47 | 48 | # Show invalid properties with the reasons. Usually used together with valid? 49 | # @return Array for valid properties with the reasons 50 | def list_invalid_properties 51 | invalid_properties = Array.new 52 | invalid_properties 53 | end 54 | 55 | # Check to see if the all the properties in the model are valid 56 | # @return true if the model is valid 57 | def valid? 58 | true 59 | end 60 | 61 | # Checks equality by comparing each attribute. 62 | # @param [Object] Object to be compared 63 | def ==(o) 64 | return true if self.equal?(o) 65 | self.class == o.class && 66 | options == o.options 67 | end 68 | 69 | # @see the `==` method 70 | # @param [Object] Object to be compared 71 | def eql?(o) 72 | self == o 73 | end 74 | 75 | # Calculates hash code according to all attributes. 76 | # @return [Fixnum] Hash code 77 | def hash 78 | [options].hash 79 | end 80 | 81 | # Builds the object from hash 82 | # @param [Hash] attributes Model attributes in the form of hash 83 | # @return [Object] Returns the model itself 84 | def build_from_hash(attributes) 85 | return nil unless attributes.is_a?(Hash) 86 | self.class.swagger_types.each_pair do |key, type| 87 | if type =~ /\AArray<(.*)>/i 88 | # check to ensure the input is an array given that the attribute 89 | # is documented as an array but the input is not 90 | if attributes[self.class.attribute_map[key]].is_a?(Array) 91 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 92 | end 93 | elsif !attributes[self.class.attribute_map[key]].nil? 94 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 95 | end # or else data not found in attributes(hash), not an issue as the data can be optional 96 | end 97 | 98 | self 99 | end 100 | 101 | # Deserializes the data based on type 102 | # @param string type Data type 103 | # @param string value Value to be deserialized 104 | # @return [Object] Deserialized data 105 | def _deserialize(type, value) 106 | case type.to_sym 107 | when :DateTime 108 | DateTime.parse(value) 109 | when :Date 110 | Date.parse(value) 111 | when :String 112 | value.to_s 113 | when :Integer 114 | value.to_i 115 | when :Float 116 | value.to_f 117 | when :BOOLEAN 118 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 119 | true 120 | else 121 | false 122 | end 123 | when :Object 124 | # generic object (usually a Hash), return directly 125 | value 126 | when /\AArray<(?.+)>\z/ 127 | inner_type = Regexp.last_match[:inner_type] 128 | value.map { |v| _deserialize(inner_type, v) } 129 | when /\AHash<(?.+?), (?.+)>\z/ 130 | k_type = Regexp.last_match[:k_type] 131 | v_type = Regexp.last_match[:v_type] 132 | {}.tap do |hash| 133 | value.each do |k, v| 134 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 135 | end 136 | end 137 | else # model 138 | temp_model = DocuSign_eSign.const_get(type).new 139 | temp_model.build_from_hash(value) 140 | end 141 | end 142 | 143 | # Returns the string representation of the object 144 | # @return [String] String presentation of the object 145 | def to_s 146 | to_hash.to_s 147 | end 148 | 149 | # to_body is an alias to to_hash (backward compatibility) 150 | # @return [Hash] Returns the object in the form of hash 151 | def to_body 152 | to_hash 153 | end 154 | 155 | # Returns the object in the form of hash 156 | # @return [Hash] Returns the object in the form of hash 157 | def to_hash 158 | hash = {} 159 | self.class.attribute_map.each_pair do |attr, param| 160 | value = self.send(attr) 161 | next if value.nil? 162 | hash[param] = _to_hash(value) 163 | end 164 | hash 165 | end 166 | 167 | # Outputs non-array value in the form of hash 168 | # For object, use to_hash. Otherwise, just return the value 169 | # @param [Object] value Any valid value 170 | # @return [Hash] Returns the value in the form of hash 171 | def _to_hash(value) 172 | if value.is_a?(Array) 173 | value.compact.map { |v| _to_hash(v) } 174 | elsif value.is_a?(Hash) 175 | {}.tap do |hash| 176 | value.each { |k, v| hash[k] = _to_hash(v) } 177 | end 178 | elsif value.respond_to? :to_hash 179 | value.to_hash 180 | else 181 | value 182 | end 183 | end 184 | 185 | end 186 | end 187 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/account_password_strength_type.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class AccountPasswordStrengthType 16 | # 17 | attr_accessor :options 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'options' => :'options' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'options' => :'Array' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'options') 42 | if (value = attributes[:'options']).is_a?(Array) 43 | self.options = value 44 | end 45 | end 46 | end 47 | 48 | # Show invalid properties with the reasons. Usually used together with valid? 49 | # @return Array for valid properties with the reasons 50 | def list_invalid_properties 51 | invalid_properties = Array.new 52 | invalid_properties 53 | end 54 | 55 | # Check to see if the all the properties in the model are valid 56 | # @return true if the model is valid 57 | def valid? 58 | true 59 | end 60 | 61 | # Checks equality by comparing each attribute. 62 | # @param [Object] Object to be compared 63 | def ==(o) 64 | return true if self.equal?(o) 65 | self.class == o.class && 66 | options == o.options 67 | end 68 | 69 | # @see the `==` method 70 | # @param [Object] Object to be compared 71 | def eql?(o) 72 | self == o 73 | end 74 | 75 | # Calculates hash code according to all attributes. 76 | # @return [Fixnum] Hash code 77 | def hash 78 | [options].hash 79 | end 80 | 81 | # Builds the object from hash 82 | # @param [Hash] attributes Model attributes in the form of hash 83 | # @return [Object] Returns the model itself 84 | def build_from_hash(attributes) 85 | return nil unless attributes.is_a?(Hash) 86 | self.class.swagger_types.each_pair do |key, type| 87 | if type =~ /\AArray<(.*)>/i 88 | # check to ensure the input is an array given that the attribute 89 | # is documented as an array but the input is not 90 | if attributes[self.class.attribute_map[key]].is_a?(Array) 91 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 92 | end 93 | elsif !attributes[self.class.attribute_map[key]].nil? 94 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 95 | end # or else data not found in attributes(hash), not an issue as the data can be optional 96 | end 97 | 98 | self 99 | end 100 | 101 | # Deserializes the data based on type 102 | # @param string type Data type 103 | # @param string value Value to be deserialized 104 | # @return [Object] Deserialized data 105 | def _deserialize(type, value) 106 | case type.to_sym 107 | when :DateTime 108 | DateTime.parse(value) 109 | when :Date 110 | Date.parse(value) 111 | when :String 112 | value.to_s 113 | when :Integer 114 | value.to_i 115 | when :Float 116 | value.to_f 117 | when :BOOLEAN 118 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 119 | true 120 | else 121 | false 122 | end 123 | when :Object 124 | # generic object (usually a Hash), return directly 125 | value 126 | when /\AArray<(?.+)>\z/ 127 | inner_type = Regexp.last_match[:inner_type] 128 | value.map { |v| _deserialize(inner_type, v) } 129 | when /\AHash<(?.+?), (?.+)>\z/ 130 | k_type = Regexp.last_match[:k_type] 131 | v_type = Regexp.last_match[:v_type] 132 | {}.tap do |hash| 133 | value.each do |k, v| 134 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 135 | end 136 | end 137 | else # model 138 | temp_model = DocuSign_eSign.const_get(type).new 139 | temp_model.build_from_hash(value) 140 | end 141 | end 142 | 143 | # Returns the string representation of the object 144 | # @return [String] String presentation of the object 145 | def to_s 146 | to_hash.to_s 147 | end 148 | 149 | # to_body is an alias to to_hash (backward compatibility) 150 | # @return [Hash] Returns the object in the form of hash 151 | def to_body 152 | to_hash 153 | end 154 | 155 | # Returns the object in the form of hash 156 | # @return [Hash] Returns the object in the form of hash 157 | def to_hash 158 | hash = {} 159 | self.class.attribute_map.each_pair do |attr, param| 160 | value = self.send(attr) 161 | next if value.nil? 162 | hash[param] = _to_hash(value) 163 | end 164 | hash 165 | end 166 | 167 | # Outputs non-array value in the form of hash 168 | # For object, use to_hash. Otherwise, just return the value 169 | # @param [Object] value Any valid value 170 | # @return [Hash] Returns the value in the form of hash 171 | def _to_hash(value) 172 | if value.is_a?(Array) 173 | value.compact.map { |v| _to_hash(v) } 174 | elsif value.is_a?(Hash) 175 | {}.tap do |hash| 176 | value.each { |k, v| hash[k] = _to_hash(v) } 177 | end 178 | elsif value.respond_to? :to_hash 179 | value.to_hash 180 | else 181 | value 182 | end 183 | end 184 | 185 | end 186 | end 187 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/account_seals.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class AccountSeals 16 | # 17 | attr_accessor :seals 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'seals' => :'seals' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'seals' => :'Array' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'seals') 42 | if (value = attributes[:'seals']).is_a?(Array) 43 | self.seals = value 44 | end 45 | end 46 | end 47 | 48 | # Show invalid properties with the reasons. Usually used together with valid? 49 | # @return Array for valid properties with the reasons 50 | def list_invalid_properties 51 | invalid_properties = Array.new 52 | invalid_properties 53 | end 54 | 55 | # Check to see if the all the properties in the model are valid 56 | # @return true if the model is valid 57 | def valid? 58 | true 59 | end 60 | 61 | # Checks equality by comparing each attribute. 62 | # @param [Object] Object to be compared 63 | def ==(o) 64 | return true if self.equal?(o) 65 | self.class == o.class && 66 | seals == o.seals 67 | end 68 | 69 | # @see the `==` method 70 | # @param [Object] Object to be compared 71 | def eql?(o) 72 | self == o 73 | end 74 | 75 | # Calculates hash code according to all attributes. 76 | # @return [Fixnum] Hash code 77 | def hash 78 | [seals].hash 79 | end 80 | 81 | # Builds the object from hash 82 | # @param [Hash] attributes Model attributes in the form of hash 83 | # @return [Object] Returns the model itself 84 | def build_from_hash(attributes) 85 | return nil unless attributes.is_a?(Hash) 86 | self.class.swagger_types.each_pair do |key, type| 87 | if type =~ /\AArray<(.*)>/i 88 | # check to ensure the input is an array given that the attribute 89 | # is documented as an array but the input is not 90 | if attributes[self.class.attribute_map[key]].is_a?(Array) 91 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 92 | end 93 | elsif !attributes[self.class.attribute_map[key]].nil? 94 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 95 | end # or else data not found in attributes(hash), not an issue as the data can be optional 96 | end 97 | 98 | self 99 | end 100 | 101 | # Deserializes the data based on type 102 | # @param string type Data type 103 | # @param string value Value to be deserialized 104 | # @return [Object] Deserialized data 105 | def _deserialize(type, value) 106 | case type.to_sym 107 | when :DateTime 108 | DateTime.parse(value) 109 | when :Date 110 | Date.parse(value) 111 | when :String 112 | value.to_s 113 | when :Integer 114 | value.to_i 115 | when :Float 116 | value.to_f 117 | when :BOOLEAN 118 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 119 | true 120 | else 121 | false 122 | end 123 | when :Object 124 | # generic object (usually a Hash), return directly 125 | value 126 | when /\AArray<(?.+)>\z/ 127 | inner_type = Regexp.last_match[:inner_type] 128 | value.map { |v| _deserialize(inner_type, v) } 129 | when /\AHash<(?.+?), (?.+)>\z/ 130 | k_type = Regexp.last_match[:k_type] 131 | v_type = Regexp.last_match[:v_type] 132 | {}.tap do |hash| 133 | value.each do |k, v| 134 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 135 | end 136 | end 137 | else # model 138 | temp_model = DocuSign_eSign.const_get(type).new 139 | temp_model.build_from_hash(value) 140 | end 141 | end 142 | 143 | # Returns the string representation of the object 144 | # @return [String] String presentation of the object 145 | def to_s 146 | to_hash.to_s 147 | end 148 | 149 | # to_body is an alias to to_hash (backward compatibility) 150 | # @return [Hash] Returns the object in the form of hash 151 | def to_body 152 | to_hash 153 | end 154 | 155 | # Returns the object in the form of hash 156 | # @return [Hash] Returns the object in the form of hash 157 | def to_hash 158 | hash = {} 159 | self.class.attribute_map.each_pair do |attr, param| 160 | value = self.send(attr) 161 | next if value.nil? 162 | hash[param] = _to_hash(value) 163 | end 164 | hash 165 | end 166 | 167 | # Outputs non-array value in the form of hash 168 | # For object, use to_hash. Otherwise, just return the value 169 | # @param [Object] value Any valid value 170 | # @return [Hash] Returns the value in the form of hash 171 | def _to_hash(value) 172 | if value.is_a?(Array) 173 | value.compact.map { |v| _to_hash(v) } 174 | elsif value.is_a?(Hash) 175 | {}.tap do |hash| 176 | value.each { |k, v| hash[k] = _to_hash(v) } 177 | end 178 | elsif value.respond_to? :to_hash 179 | value.to_hash 180 | else 181 | value 182 | end 183 | end 184 | 185 | end 186 | end 187 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/brand_request.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | # This request object contains information about a specific brand. 16 | class BrandRequest 17 | # The ID of the brand used in API calls 18 | attr_accessor :brand_id 19 | 20 | # Attribute mapping from ruby-style variable name to JSON key. 21 | def self.attribute_map 22 | { 23 | :'brand_id' => :'brandId' 24 | } 25 | end 26 | 27 | # Attribute type mapping. 28 | def self.swagger_types 29 | { 30 | :'brand_id' => :'String' 31 | } 32 | end 33 | 34 | # Initializes the object 35 | # @param [Hash] attributes Model attributes in the form of hash 36 | def initialize(attributes = {}) 37 | return unless attributes.is_a?(Hash) 38 | 39 | # convert string to symbol for hash key 40 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 41 | 42 | if attributes.has_key?(:'brandId') 43 | self.brand_id = attributes[:'brandId'] 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 | brand_id == o.brand_id 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 | [brand_id].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_eSign.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_esign/models/bulk_recipients_update_response.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign REST API 3 | 4 | #The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class BulkRecipientsUpdateResponse 16 | # 17 | attr_accessor :signer 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'signer' => :'signer' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'signer' => :'Signer' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'signer') 42 | self.signer = attributes[:'signer'] 43 | end 44 | end 45 | 46 | # Show invalid properties with the reasons. Usually used together with valid? 47 | # @return Array for valid properties with the reasons 48 | def list_invalid_properties 49 | invalid_properties = Array.new 50 | invalid_properties 51 | end 52 | 53 | # Check to see if the all the properties in the model are valid 54 | # @return true if the model is valid 55 | def valid? 56 | true 57 | end 58 | 59 | # Checks equality by comparing each attribute. 60 | # @param [Object] Object to be compared 61 | def ==(o) 62 | return true if self.equal?(o) 63 | self.class == o.class && 64 | signer == o.signer 65 | end 66 | 67 | # @see the `==` method 68 | # @param [Object] Object to be compared 69 | def eql?(o) 70 | self == o 71 | end 72 | 73 | # Calculates hash code according to all attributes. 74 | # @return [Fixnum] Hash code 75 | def hash 76 | [signer].hash 77 | end 78 | 79 | # Builds the object from hash 80 | # @param [Hash] attributes Model attributes in the form of hash 81 | # @return [Object] Returns the model itself 82 | def build_from_hash(attributes) 83 | return nil unless attributes.is_a?(Hash) 84 | self.class.swagger_types.each_pair do |key, type| 85 | if type =~ /\AArray<(.*)>/i 86 | # check to ensure the input is an array given that the attribute 87 | # is documented as an array but the input is not 88 | if attributes[self.class.attribute_map[key]].is_a?(Array) 89 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 90 | end 91 | elsif !attributes[self.class.attribute_map[key]].nil? 92 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 93 | end # or else data not found in attributes(hash), not an issue as the data can be optional 94 | end 95 | 96 | self 97 | end 98 | 99 | # Deserializes the data based on type 100 | # @param string type Data type 101 | # @param string value Value to be deserialized 102 | # @return [Object] Deserialized data 103 | def _deserialize(type, value) 104 | case type.to_sym 105 | when :DateTime 106 | DateTime.parse(value) 107 | when :Date 108 | Date.parse(value) 109 | when :String 110 | value.to_s 111 | when :Integer 112 | value.to_i 113 | when :Float 114 | value.to_f 115 | when :BOOLEAN 116 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 117 | true 118 | else 119 | false 120 | end 121 | when :Object 122 | # generic object (usually a Hash), return directly 123 | value 124 | when /\AArray<(?.+)>\z/ 125 | inner_type = Regexp.last_match[:inner_type] 126 | value.map { |v| _deserialize(inner_type, v) } 127 | when /\AHash<(?.+?), (?.+)>\z/ 128 | k_type = Regexp.last_match[:k_type] 129 | v_type = Regexp.last_match[:v_type] 130 | {}.tap do |hash| 131 | value.each do |k, v| 132 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 133 | end 134 | end 135 | else # model 136 | temp_model = DocuSign_eSign.const_get(type).new 137 | temp_model.build_from_hash(value) 138 | end 139 | end 140 | 141 | # Returns the string representation of the object 142 | # @return [String] String presentation of the object 143 | def to_s 144 | to_hash.to_s 145 | end 146 | 147 | # to_body is an alias to to_hash (backward compatibility) 148 | # @return [Hash] Returns the object in the form of hash 149 | def to_body 150 | to_hash 151 | end 152 | 153 | # Returns the object in the form of hash 154 | # @return [Hash] Returns the object in the form of hash 155 | def to_hash 156 | hash = {} 157 | self.class.attribute_map.each_pair do |attr, param| 158 | value = self.send(attr) 159 | next if value.nil? 160 | hash[param] = _to_hash(value) 161 | end 162 | hash 163 | end 164 | 165 | # Outputs non-array value in the form of hash 166 | # For object, use to_hash. Otherwise, just return the value 167 | # @param [Object] value Any valid value 168 | # @return [Hash] Returns the value in the form of hash 169 | def _to_hash(value) 170 | if value.is_a?(Array) 171 | value.compact.map { |v| _to_hash(v) } 172 | elsif value.is_a?(Hash) 173 | {}.tap do |hash| 174 | value.each { |k, v| hash[k] = _to_hash(v) } 175 | end 176 | elsif value.respond_to? :to_hash 177 | value.to_hash 178 | else 179 | value 180 | end 181 | end 182 | 183 | end 184 | end 185 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/bulk_send_batch_request.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class BulkSendBatchRequest 16 | # 17 | attr_accessor :batch_name 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'batch_name' => :'batchName' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'batch_name' => :'String' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'batchName') 42 | self.batch_name = attributes[:'batchName'] 43 | end 44 | end 45 | 46 | # Show invalid properties with the reasons. Usually used together with valid? 47 | # @return Array for valid properties with the reasons 48 | def list_invalid_properties 49 | invalid_properties = Array.new 50 | invalid_properties 51 | end 52 | 53 | # Check to see if the all the properties in the model are valid 54 | # @return true if the model is valid 55 | def valid? 56 | true 57 | end 58 | 59 | # Checks equality by comparing each attribute. 60 | # @param [Object] Object to be compared 61 | def ==(o) 62 | return true if self.equal?(o) 63 | self.class == o.class && 64 | batch_name == o.batch_name 65 | end 66 | 67 | # @see the `==` method 68 | # @param [Object] Object to be compared 69 | def eql?(o) 70 | self == o 71 | end 72 | 73 | # Calculates hash code according to all attributes. 74 | # @return [Fixnum] Hash code 75 | def hash 76 | [batch_name].hash 77 | end 78 | 79 | # Builds the object from hash 80 | # @param [Hash] attributes Model attributes in the form of hash 81 | # @return [Object] Returns the model itself 82 | def build_from_hash(attributes) 83 | return nil unless attributes.is_a?(Hash) 84 | self.class.swagger_types.each_pair do |key, type| 85 | if type =~ /\AArray<(.*)>/i 86 | # check to ensure the input is an array given that the attribute 87 | # is documented as an array but the input is not 88 | if attributes[self.class.attribute_map[key]].is_a?(Array) 89 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 90 | end 91 | elsif !attributes[self.class.attribute_map[key]].nil? 92 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 93 | end # or else data not found in attributes(hash), not an issue as the data can be optional 94 | end 95 | 96 | self 97 | end 98 | 99 | # Deserializes the data based on type 100 | # @param string type Data type 101 | # @param string value Value to be deserialized 102 | # @return [Object] Deserialized data 103 | def _deserialize(type, value) 104 | case type.to_sym 105 | when :DateTime 106 | DateTime.parse(value) 107 | when :Date 108 | Date.parse(value) 109 | when :String 110 | value.to_s 111 | when :Integer 112 | value.to_i 113 | when :Float 114 | value.to_f 115 | when :BOOLEAN 116 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 117 | true 118 | else 119 | false 120 | end 121 | when :Object 122 | # generic object (usually a Hash), return directly 123 | value 124 | when /\AArray<(?.+)>\z/ 125 | inner_type = Regexp.last_match[:inner_type] 126 | value.map { |v| _deserialize(inner_type, v) } 127 | when /\AHash<(?.+?), (?.+)>\z/ 128 | k_type = Regexp.last_match[:k_type] 129 | v_type = Regexp.last_match[:v_type] 130 | {}.tap do |hash| 131 | value.each do |k, v| 132 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 133 | end 134 | end 135 | else # model 136 | temp_model = DocuSign_eSign.const_get(type).new 137 | temp_model.build_from_hash(value) 138 | end 139 | end 140 | 141 | # Returns the string representation of the object 142 | # @return [String] String presentation of the object 143 | def to_s 144 | to_hash.to_s 145 | end 146 | 147 | # to_body is an alias to to_hash (backward compatibility) 148 | # @return [Hash] Returns the object in the form of hash 149 | def to_body 150 | to_hash 151 | end 152 | 153 | # Returns the object in the form of hash 154 | # @return [Hash] Returns the object in the form of hash 155 | def to_hash 156 | hash = {} 157 | self.class.attribute_map.each_pair do |attr, param| 158 | value = self.send(attr) 159 | next if value.nil? 160 | hash[param] = _to_hash(value) 161 | end 162 | hash 163 | end 164 | 165 | # Outputs non-array value in the form of hash 166 | # For object, use to_hash. Otherwise, just return the value 167 | # @param [Object] value Any valid value 168 | # @return [Hash] Returns the value in the form of hash 169 | def _to_hash(value) 170 | if value.is_a?(Array) 171 | value.compact.map { |v| _to_hash(v) } 172 | elsif value.is_a?(Hash) 173 | {}.tap do |hash| 174 | value.each { |k, v| hash[k] = _to_hash(v) } 175 | end 176 | elsif value.respond_to? :to_hash 177 | value.to_hash 178 | else 179 | value 180 | end 181 | end 182 | 183 | end 184 | end 185 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/connect_delete_failure_result.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class ConnectDeleteFailureResult 16 | # Attribute mapping from ruby-style variable name to JSON key. 17 | def self.attribute_map 18 | { 19 | } 20 | end 21 | 22 | # Attribute type mapping. 23 | def self.swagger_types 24 | { 25 | } 26 | end 27 | 28 | # Initializes the object 29 | # @param [Hash] attributes Model attributes in the form of hash 30 | def initialize(attributes = {}) 31 | return unless attributes.is_a?(Hash) 32 | 33 | # convert string to symbol for hash key 34 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 35 | end 36 | 37 | # Show invalid properties with the reasons. Usually used together with valid? 38 | # @return Array for valid properties with the reasons 39 | def list_invalid_properties 40 | invalid_properties = Array.new 41 | invalid_properties 42 | end 43 | 44 | # Check to see if the all the properties in the model are valid 45 | # @return true if the model is valid 46 | def valid? 47 | true 48 | end 49 | 50 | # Checks equality by comparing each attribute. 51 | # @param [Object] Object to be compared 52 | def ==(o) 53 | return true if self.equal?(o) 54 | self.class == o.class 55 | end 56 | 57 | # @see the `==` method 58 | # @param [Object] Object to be compared 59 | def eql?(o) 60 | self == o 61 | end 62 | 63 | # Calculates hash code according to all attributes. 64 | # @return [Fixnum] Hash code 65 | def hash 66 | [].hash 67 | end 68 | 69 | # Builds the object from hash 70 | # @param [Hash] attributes Model attributes in the form of hash 71 | # @return [Object] Returns the model itself 72 | def build_from_hash(attributes) 73 | return nil unless attributes.is_a?(Hash) 74 | self.class.swagger_types.each_pair do |key, type| 75 | if type =~ /\AArray<(.*)>/i 76 | # check to ensure the input is an array given that the attribute 77 | # is documented as an array but the input is not 78 | if attributes[self.class.attribute_map[key]].is_a?(Array) 79 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 80 | end 81 | elsif !attributes[self.class.attribute_map[key]].nil? 82 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 83 | end # or else data not found in attributes(hash), not an issue as the data can be optional 84 | end 85 | 86 | self 87 | end 88 | 89 | # Deserializes the data based on type 90 | # @param string type Data type 91 | # @param string value Value to be deserialized 92 | # @return [Object] Deserialized data 93 | def _deserialize(type, value) 94 | case type.to_sym 95 | when :DateTime 96 | DateTime.parse(value) 97 | when :Date 98 | Date.parse(value) 99 | when :String 100 | value.to_s 101 | when :Integer 102 | value.to_i 103 | when :Float 104 | value.to_f 105 | when :BOOLEAN 106 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 107 | true 108 | else 109 | false 110 | end 111 | when :Object 112 | # generic object (usually a Hash), return directly 113 | value 114 | when /\AArray<(?.+)>\z/ 115 | inner_type = Regexp.last_match[:inner_type] 116 | value.map { |v| _deserialize(inner_type, v) } 117 | when /\AHash<(?.+?), (?.+)>\z/ 118 | k_type = Regexp.last_match[:k_type] 119 | v_type = Regexp.last_match[:v_type] 120 | {}.tap do |hash| 121 | value.each do |k, v| 122 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 123 | end 124 | end 125 | else # model 126 | temp_model = DocuSign_eSign.const_get(type).new 127 | temp_model.build_from_hash(value) 128 | end 129 | end 130 | 131 | # Returns the string representation of the object 132 | # @return [String] String presentation of the object 133 | def to_s 134 | to_hash.to_s 135 | end 136 | 137 | # to_body is an alias to to_hash (backward compatibility) 138 | # @return [Hash] Returns the object in the form of hash 139 | def to_body 140 | to_hash 141 | end 142 | 143 | # Returns the object in the form of hash 144 | # @return [Hash] Returns the object in the form of hash 145 | def to_hash 146 | hash = {} 147 | self.class.attribute_map.each_pair do |attr, param| 148 | value = self.send(attr) 149 | next if value.nil? 150 | hash[param] = _to_hash(value) 151 | end 152 | hash 153 | end 154 | 155 | # Outputs non-array value in the form of hash 156 | # For object, use to_hash. Otherwise, just return the value 157 | # @param [Object] value Any valid value 158 | # @return [Hash] Returns the value in the form of hash 159 | def _to_hash(value) 160 | if value.is_a?(Array) 161 | value.compact.map { |v| _to_hash(v) } 162 | elsif value.is_a?(Hash) 163 | {}.tap do |hash| 164 | value.each { |k, v| hash[k] = _to_hash(v) } 165 | end 166 | elsif value.respond_to? :to_hash 167 | value.to_hash 168 | else 169 | value 170 | end 171 | end 172 | 173 | end 174 | end 175 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/connected_object_details.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class ConnectedObjectDetails 16 | # 17 | attr_accessor :record_id 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'record_id' => :'recordId' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'record_id' => :'String' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'recordId') 42 | self.record_id = attributes[:'recordId'] 43 | end 44 | end 45 | 46 | # Show invalid properties with the reasons. Usually used together with valid? 47 | # @return Array for valid properties with the reasons 48 | def list_invalid_properties 49 | invalid_properties = Array.new 50 | invalid_properties 51 | end 52 | 53 | # Check to see if the all the properties in the model are valid 54 | # @return true if the model is valid 55 | def valid? 56 | true 57 | end 58 | 59 | # Checks equality by comparing each attribute. 60 | # @param [Object] Object to be compared 61 | def ==(o) 62 | return true if self.equal?(o) 63 | self.class == o.class && 64 | record_id == o.record_id 65 | end 66 | 67 | # @see the `==` method 68 | # @param [Object] Object to be compared 69 | def eql?(o) 70 | self == o 71 | end 72 | 73 | # Calculates hash code according to all attributes. 74 | # @return [Fixnum] Hash code 75 | def hash 76 | [record_id].hash 77 | end 78 | 79 | # Builds the object from hash 80 | # @param [Hash] attributes Model attributes in the form of hash 81 | # @return [Object] Returns the model itself 82 | def build_from_hash(attributes) 83 | return nil unless attributes.is_a?(Hash) 84 | self.class.swagger_types.each_pair do |key, type| 85 | if type =~ /\AArray<(.*)>/i 86 | # check to ensure the input is an array given that the attribute 87 | # is documented as an array but the input is not 88 | if attributes[self.class.attribute_map[key]].is_a?(Array) 89 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 90 | end 91 | elsif !attributes[self.class.attribute_map[key]].nil? 92 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 93 | end # or else data not found in attributes(hash), not an issue as the data can be optional 94 | end 95 | 96 | self 97 | end 98 | 99 | # Deserializes the data based on type 100 | # @param string type Data type 101 | # @param string value Value to be deserialized 102 | # @return [Object] Deserialized data 103 | def _deserialize(type, value) 104 | case type.to_sym 105 | when :DateTime 106 | DateTime.parse(value) 107 | when :Date 108 | Date.parse(value) 109 | when :String 110 | value.to_s 111 | when :Integer 112 | value.to_i 113 | when :Float 114 | value.to_f 115 | when :BOOLEAN 116 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 117 | true 118 | else 119 | false 120 | end 121 | when :Object 122 | # generic object (usually a Hash), return directly 123 | value 124 | when /\AArray<(?.+)>\z/ 125 | inner_type = Regexp.last_match[:inner_type] 126 | value.map { |v| _deserialize(inner_type, v) } 127 | when /\AHash<(?.+?), (?.+)>\z/ 128 | k_type = Regexp.last_match[:k_type] 129 | v_type = Regexp.last_match[:v_type] 130 | {}.tap do |hash| 131 | value.each do |k, v| 132 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 133 | end 134 | end 135 | else # model 136 | temp_model = DocuSign_eSign.const_get(type).new 137 | temp_model.build_from_hash(value) 138 | end 139 | end 140 | 141 | # Returns the string representation of the object 142 | # @return [String] String presentation of the object 143 | def to_s 144 | to_hash.to_s 145 | end 146 | 147 | # to_body is an alias to to_hash (backward compatibility) 148 | # @return [Hash] Returns the object in the form of hash 149 | def to_body 150 | to_hash 151 | end 152 | 153 | # Returns the object in the form of hash 154 | # @return [Hash] Returns the object in the form of hash 155 | def to_hash 156 | hash = {} 157 | self.class.attribute_map.each_pair do |attr, param| 158 | value = self.send(attr) 159 | next if value.nil? 160 | hash[param] = _to_hash(value) 161 | end 162 | hash 163 | end 164 | 165 | # Outputs non-array value in the form of hash 166 | # For object, use to_hash. Otherwise, just return the value 167 | # @param [Object] value Any valid value 168 | # @return [Hash] Returns the value in the form of hash 169 | def _to_hash(value) 170 | if value.is_a?(Array) 171 | value.compact.map { |v| _to_hash(v) } 172 | elsif value.is_a?(Hash) 173 | {}.tap do |hash| 174 | value.each { |k, v| hash[k] = _to_hash(v) } 175 | end 176 | elsif value.respond_to? :to_hash 177 | value.to_hash 178 | else 179 | value 180 | end 181 | end 182 | 183 | end 184 | end 185 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/display_appliance_info.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign REST API 3 | 4 | #The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class DisplayApplianceInfo 16 | # Attribute mapping from ruby-style variable name to JSON key. 17 | def self.attribute_map 18 | { 19 | } 20 | end 21 | 22 | # Attribute type mapping. 23 | def self.swagger_types 24 | { 25 | } 26 | end 27 | 28 | # Initializes the object 29 | # @param [Hash] attributes Model attributes in the form of hash 30 | def initialize(attributes = {}) 31 | return unless attributes.is_a?(Hash) 32 | 33 | # convert string to symbol for hash key 34 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 35 | end 36 | 37 | # Show invalid properties with the reasons. Usually used together with valid? 38 | # @return Array for valid properties with the reasons 39 | def list_invalid_properties 40 | invalid_properties = Array.new 41 | invalid_properties 42 | end 43 | 44 | # Check to see if the all the properties in the model are valid 45 | # @return true if the model is valid 46 | def valid? 47 | true 48 | end 49 | 50 | # Checks equality by comparing each attribute. 51 | # @param [Object] Object to be compared 52 | def ==(o) 53 | return true if self.equal?(o) 54 | self.class == o.class 55 | end 56 | 57 | # @see the `==` method 58 | # @param [Object] Object to be compared 59 | def eql?(o) 60 | self == o 61 | end 62 | 63 | # Calculates hash code according to all attributes. 64 | # @return [Fixnum] Hash code 65 | def hash 66 | [].hash 67 | end 68 | 69 | # Builds the object from hash 70 | # @param [Hash] attributes Model attributes in the form of hash 71 | # @return [Object] Returns the model itself 72 | def build_from_hash(attributes) 73 | return nil unless attributes.is_a?(Hash) 74 | self.class.swagger_types.each_pair do |key, type| 75 | if type =~ /\AArray<(.*)>/i 76 | # check to ensure the input is an array given that the attribute 77 | # is documented as an array but the input is not 78 | if attributes[self.class.attribute_map[key]].is_a?(Array) 79 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 80 | end 81 | elsif !attributes[self.class.attribute_map[key]].nil? 82 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 83 | end # or else data not found in attributes(hash), not an issue as the data can be optional 84 | end 85 | 86 | self 87 | end 88 | 89 | # Deserializes the data based on type 90 | # @param string type Data type 91 | # @param string value Value to be deserialized 92 | # @return [Object] Deserialized data 93 | def _deserialize(type, value) 94 | case type.to_sym 95 | when :DateTime 96 | DateTime.parse(value) 97 | when :Date 98 | Date.parse(value) 99 | when :String 100 | value.to_s 101 | when :Integer 102 | value.to_i 103 | when :Float 104 | value.to_f 105 | when :BOOLEAN 106 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 107 | true 108 | else 109 | false 110 | end 111 | when :Object 112 | # generic object (usually a Hash), return directly 113 | value 114 | when /\AArray<(?.+)>\z/ 115 | inner_type = Regexp.last_match[:inner_type] 116 | value.map { |v| _deserialize(inner_type, v) } 117 | when /\AHash<(?.+?), (?.+)>\z/ 118 | k_type = Regexp.last_match[:k_type] 119 | v_type = Regexp.last_match[:v_type] 120 | {}.tap do |hash| 121 | value.each do |k, v| 122 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 123 | end 124 | end 125 | else # model 126 | temp_model = DocuSign_eSign.const_get(type).new 127 | temp_model.build_from_hash(value) 128 | end 129 | end 130 | 131 | # Returns the string representation of the object 132 | # @return [String] String presentation of the object 133 | def to_s 134 | to_hash.to_s 135 | end 136 | 137 | # to_body is an alias to to_hash (backward compatibility) 138 | # @return [Hash] Returns the object in the form of hash 139 | def to_body 140 | to_hash 141 | end 142 | 143 | # Returns the object in the form of hash 144 | # @return [Hash] Returns the object in the form of hash 145 | def to_hash 146 | hash = {} 147 | self.class.attribute_map.each_pair do |attr, param| 148 | value = self.send(attr) 149 | next if value.nil? 150 | hash[param] = _to_hash(value) 151 | end 152 | hash 153 | end 154 | 155 | # Outputs non-array value in the form of hash 156 | # For object, use to_hash. Otherwise, just return the value 157 | # @param [Object] value Any valid value 158 | # @return [Hash] Returns the value in the form of hash 159 | def _to_hash(value) 160 | if value.is_a?(Array) 161 | value.compact.map { |v| _to_hash(v) } 162 | elsif value.is_a?(Hash) 163 | {}.tap do |hash| 164 | value.each { |k, v| hash[k] = _to_hash(v) } 165 | end 166 | elsif value.respond_to? :to_hash 167 | value.to_hash 168 | else 169 | value 170 | end 171 | end 172 | 173 | end 174 | end 175 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/display_appliance_pdf.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign REST API 3 | 4 | #The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class DisplayAppliancePdf 16 | # Attribute mapping from ruby-style variable name to JSON key. 17 | def self.attribute_map 18 | { 19 | } 20 | end 21 | 22 | # Attribute type mapping. 23 | def self.swagger_types 24 | { 25 | } 26 | end 27 | 28 | # Initializes the object 29 | # @param [Hash] attributes Model attributes in the form of hash 30 | def initialize(attributes = {}) 31 | return unless attributes.is_a?(Hash) 32 | 33 | # convert string to symbol for hash key 34 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 35 | end 36 | 37 | # Show invalid properties with the reasons. Usually used together with valid? 38 | # @return Array for valid properties with the reasons 39 | def list_invalid_properties 40 | invalid_properties = Array.new 41 | invalid_properties 42 | end 43 | 44 | # Check to see if the all the properties in the model are valid 45 | # @return true if the model is valid 46 | def valid? 47 | true 48 | end 49 | 50 | # Checks equality by comparing each attribute. 51 | # @param [Object] Object to be compared 52 | def ==(o) 53 | return true if self.equal?(o) 54 | self.class == o.class 55 | end 56 | 57 | # @see the `==` method 58 | # @param [Object] Object to be compared 59 | def eql?(o) 60 | self == o 61 | end 62 | 63 | # Calculates hash code according to all attributes. 64 | # @return [Fixnum] Hash code 65 | def hash 66 | [].hash 67 | end 68 | 69 | # Builds the object from hash 70 | # @param [Hash] attributes Model attributes in the form of hash 71 | # @return [Object] Returns the model itself 72 | def build_from_hash(attributes) 73 | return nil unless attributes.is_a?(Hash) 74 | self.class.swagger_types.each_pair do |key, type| 75 | if type =~ /\AArray<(.*)>/i 76 | # check to ensure the input is an array given that the attribute 77 | # is documented as an array but the input is not 78 | if attributes[self.class.attribute_map[key]].is_a?(Array) 79 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 80 | end 81 | elsif !attributes[self.class.attribute_map[key]].nil? 82 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 83 | end # or else data not found in attributes(hash), not an issue as the data can be optional 84 | end 85 | 86 | self 87 | end 88 | 89 | # Deserializes the data based on type 90 | # @param string type Data type 91 | # @param string value Value to be deserialized 92 | # @return [Object] Deserialized data 93 | def _deserialize(type, value) 94 | case type.to_sym 95 | when :DateTime 96 | DateTime.parse(value) 97 | when :Date 98 | Date.parse(value) 99 | when :String 100 | value.to_s 101 | when :Integer 102 | value.to_i 103 | when :Float 104 | value.to_f 105 | when :BOOLEAN 106 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 107 | true 108 | else 109 | false 110 | end 111 | when :Object 112 | # generic object (usually a Hash), return directly 113 | value 114 | when /\AArray<(?.+)>\z/ 115 | inner_type = Regexp.last_match[:inner_type] 116 | value.map { |v| _deserialize(inner_type, v) } 117 | when /\AHash<(?.+?), (?.+)>\z/ 118 | k_type = Regexp.last_match[:k_type] 119 | v_type = Regexp.last_match[:v_type] 120 | {}.tap do |hash| 121 | value.each do |k, v| 122 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 123 | end 124 | end 125 | else # model 126 | temp_model = DocuSign_eSign.const_get(type).new 127 | temp_model.build_from_hash(value) 128 | end 129 | end 130 | 131 | # Returns the string representation of the object 132 | # @return [String] String presentation of the object 133 | def to_s 134 | to_hash.to_s 135 | end 136 | 137 | # to_body is an alias to to_hash (backward compatibility) 138 | # @return [Hash] Returns the object in the form of hash 139 | def to_body 140 | to_hash 141 | end 142 | 143 | # Returns the object in the form of hash 144 | # @return [Hash] Returns the object in the form of hash 145 | def to_hash 146 | hash = {} 147 | self.class.attribute_map.each_pair do |attr, param| 148 | value = self.send(attr) 149 | next if value.nil? 150 | hash[param] = _to_hash(value) 151 | end 152 | hash 153 | end 154 | 155 | # Outputs non-array value in the form of hash 156 | # For object, use to_hash. Otherwise, just return the value 157 | # @param [Object] value Any valid value 158 | # @return [Hash] Returns the value in the form of hash 159 | def _to_hash(value) 160 | if value.is_a?(Array) 161 | value.compact.map { |v| _to_hash(v) } 162 | elsif value.is_a?(Hash) 163 | {}.tap do |hash| 164 | value.each { |k, v| hash[k] = _to_hash(v) } 165 | end 166 | elsif value.respond_to? :to_hash 167 | value.to_hash 168 | else 169 | value 170 | end 171 | end 172 | 173 | end 174 | end 175 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/display_appliance_signer_attachment.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign REST API 3 | 4 | #The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class DisplayApplianceSignerAttachment 16 | # Attribute mapping from ruby-style variable name to JSON key. 17 | def self.attribute_map 18 | { 19 | } 20 | end 21 | 22 | # Attribute type mapping. 23 | def self.swagger_types 24 | { 25 | } 26 | end 27 | 28 | # Initializes the object 29 | # @param [Hash] attributes Model attributes in the form of hash 30 | def initialize(attributes = {}) 31 | return unless attributes.is_a?(Hash) 32 | 33 | # convert string to symbol for hash key 34 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 35 | end 36 | 37 | # Show invalid properties with the reasons. Usually used together with valid? 38 | # @return Array for valid properties with the reasons 39 | def list_invalid_properties 40 | invalid_properties = Array.new 41 | invalid_properties 42 | end 43 | 44 | # Check to see if the all the properties in the model are valid 45 | # @return true if the model is valid 46 | def valid? 47 | true 48 | end 49 | 50 | # Checks equality by comparing each attribute. 51 | # @param [Object] Object to be compared 52 | def ==(o) 53 | return true if self.equal?(o) 54 | self.class == o.class 55 | end 56 | 57 | # @see the `==` method 58 | # @param [Object] Object to be compared 59 | def eql?(o) 60 | self == o 61 | end 62 | 63 | # Calculates hash code according to all attributes. 64 | # @return [Fixnum] Hash code 65 | def hash 66 | [].hash 67 | end 68 | 69 | # Builds the object from hash 70 | # @param [Hash] attributes Model attributes in the form of hash 71 | # @return [Object] Returns the model itself 72 | def build_from_hash(attributes) 73 | return nil unless attributes.is_a?(Hash) 74 | self.class.swagger_types.each_pair do |key, type| 75 | if type =~ /\AArray<(.*)>/i 76 | # check to ensure the input is an array given that the attribute 77 | # is documented as an array but the input is not 78 | if attributes[self.class.attribute_map[key]].is_a?(Array) 79 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 80 | end 81 | elsif !attributes[self.class.attribute_map[key]].nil? 82 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 83 | end # or else data not found in attributes(hash), not an issue as the data can be optional 84 | end 85 | 86 | self 87 | end 88 | 89 | # Deserializes the data based on type 90 | # @param string type Data type 91 | # @param string value Value to be deserialized 92 | # @return [Object] Deserialized data 93 | def _deserialize(type, value) 94 | case type.to_sym 95 | when :DateTime 96 | DateTime.parse(value) 97 | when :Date 98 | Date.parse(value) 99 | when :String 100 | value.to_s 101 | when :Integer 102 | value.to_i 103 | when :Float 104 | value.to_f 105 | when :BOOLEAN 106 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 107 | true 108 | else 109 | false 110 | end 111 | when :Object 112 | # generic object (usually a Hash), return directly 113 | value 114 | when /\AArray<(?.+)>\z/ 115 | inner_type = Regexp.last_match[:inner_type] 116 | value.map { |v| _deserialize(inner_type, v) } 117 | when /\AHash<(?.+?), (?.+)>\z/ 118 | k_type = Regexp.last_match[:k_type] 119 | v_type = Regexp.last_match[:v_type] 120 | {}.tap do |hash| 121 | value.each do |k, v| 122 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 123 | end 124 | end 125 | else # model 126 | temp_model = DocuSign_eSign.const_get(type).new 127 | temp_model.build_from_hash(value) 128 | end 129 | end 130 | 131 | # Returns the string representation of the object 132 | # @return [String] String presentation of the object 133 | def to_s 134 | to_hash.to_s 135 | end 136 | 137 | # to_body is an alias to to_hash (backward compatibility) 138 | # @return [Hash] Returns the object in the form of hash 139 | def to_body 140 | to_hash 141 | end 142 | 143 | # Returns the object in the form of hash 144 | # @return [Hash] Returns the object in the form of hash 145 | def to_hash 146 | hash = {} 147 | self.class.attribute_map.each_pair do |attr, param| 148 | value = self.send(attr) 149 | next if value.nil? 150 | hash[param] = _to_hash(value) 151 | end 152 | hash 153 | end 154 | 155 | # Outputs non-array value in the form of hash 156 | # For object, use to_hash. Otherwise, just return the value 157 | # @param [Object] value Any valid value 158 | # @return [Hash] Returns the value in the form of hash 159 | def _to_hash(value) 160 | if value.is_a?(Array) 161 | value.compact.map { |v| _to_hash(v) } 162 | elsif value.is_a?(Hash) 163 | {}.tap do |hash| 164 | value.each { |k, v| hash[k] = _to_hash(v) } 165 | end 166 | elsif value.respond_to? :to_hash 167 | value.to_hash 168 | else 169 | value 170 | end 171 | end 172 | 173 | end 174 | end 175 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/envelope_form_data_prefill_form_data.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign REST API 3 | 4 | #The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class EnvelopeFormDataPrefillFormData 16 | # 17 | attr_accessor :form_data 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'form_data' => :'formData' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'form_data' => :'Array' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'formData') 42 | if (value = attributes[:'formData']).is_a?(Array) 43 | self.form_data = value 44 | end 45 | end 46 | end 47 | 48 | # Show invalid properties with the reasons. Usually used together with valid? 49 | # @return Array for valid properties with the reasons 50 | def list_invalid_properties 51 | invalid_properties = Array.new 52 | invalid_properties 53 | end 54 | 55 | # Check to see if the all the properties in the model are valid 56 | # @return true if the model is valid 57 | def valid? 58 | true 59 | end 60 | 61 | # Checks equality by comparing each attribute. 62 | # @param [Object] Object to be compared 63 | def ==(o) 64 | return true if self.equal?(o) 65 | self.class == o.class && 66 | form_data == o.form_data 67 | end 68 | 69 | # @see the `==` method 70 | # @param [Object] Object to be compared 71 | def eql?(o) 72 | self == o 73 | end 74 | 75 | # Calculates hash code according to all attributes. 76 | # @return [Fixnum] Hash code 77 | def hash 78 | [form_data].hash 79 | end 80 | 81 | # Builds the object from hash 82 | # @param [Hash] attributes Model attributes in the form of hash 83 | # @return [Object] Returns the model itself 84 | def build_from_hash(attributes) 85 | return nil unless attributes.is_a?(Hash) 86 | self.class.swagger_types.each_pair do |key, type| 87 | if type =~ /\AArray<(.*)>/i 88 | # check to ensure the input is an array given that the attribute 89 | # is documented as an array but the input is not 90 | if attributes[self.class.attribute_map[key]].is_a?(Array) 91 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 92 | end 93 | elsif !attributes[self.class.attribute_map[key]].nil? 94 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 95 | end # or else data not found in attributes(hash), not an issue as the data can be optional 96 | end 97 | 98 | self 99 | end 100 | 101 | # Deserializes the data based on type 102 | # @param string type Data type 103 | # @param string value Value to be deserialized 104 | # @return [Object] Deserialized data 105 | def _deserialize(type, value) 106 | case type.to_sym 107 | when :DateTime 108 | DateTime.parse(value) 109 | when :Date 110 | Date.parse(value) 111 | when :String 112 | value.to_s 113 | when :Integer 114 | value.to_i 115 | when :Float 116 | value.to_f 117 | when :BOOLEAN 118 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 119 | true 120 | else 121 | false 122 | end 123 | when :Object 124 | # generic object (usually a Hash), return directly 125 | value 126 | when /\AArray<(?.+)>\z/ 127 | inner_type = Regexp.last_match[:inner_type] 128 | value.map { |v| _deserialize(inner_type, v) } 129 | when /\AHash<(?.+?), (?.+)>\z/ 130 | k_type = Regexp.last_match[:k_type] 131 | v_type = Regexp.last_match[:v_type] 132 | {}.tap do |hash| 133 | value.each do |k, v| 134 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 135 | end 136 | end 137 | else # model 138 | temp_model = DocuSign_eSign.const_get(type).new 139 | temp_model.build_from_hash(value) 140 | end 141 | end 142 | 143 | # Returns the string representation of the object 144 | # @return [String] String presentation of the object 145 | def to_s 146 | to_hash.to_s 147 | end 148 | 149 | # to_body is an alias to to_hash (backward compatibility) 150 | # @return [Hash] Returns the object in the form of hash 151 | def to_body 152 | to_hash 153 | end 154 | 155 | # Returns the object in the form of hash 156 | # @return [Hash] Returns the object in the form of hash 157 | def to_hash 158 | hash = {} 159 | self.class.attribute_map.each_pair do |attr, param| 160 | value = self.send(attr) 161 | next if value.nil? 162 | hash[param] = _to_hash(value) 163 | end 164 | hash 165 | end 166 | 167 | # Outputs non-array value in the form of hash 168 | # For object, use to_hash. Otherwise, just return the value 169 | # @param [Object] value Any valid value 170 | # @return [Hash] Returns the value in the form of hash 171 | def _to_hash(value) 172 | if value.is_a?(Array) 173 | value.compact.map { |v| _to_hash(v) } 174 | elsif value.is_a?(Hash) 175 | {}.tap do |hash| 176 | value.each { |k, v| hash[k] = _to_hash(v) } 177 | end 178 | elsif value.respond_to? :to_hash 179 | value.to_hash 180 | else 181 | value 182 | end 183 | end 184 | 185 | end 186 | end 187 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/file_type_list.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class FileTypeList 16 | # A collection of file types. 17 | attr_accessor :file_types 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'file_types' => :'fileTypes' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'file_types' => :'Array' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'fileTypes') 42 | if (value = attributes[:'fileTypes']).is_a?(Array) 43 | self.file_types = value 44 | end 45 | end 46 | end 47 | 48 | # Show invalid properties with the reasons. Usually used together with valid? 49 | # @return Array for valid properties with the reasons 50 | def list_invalid_properties 51 | invalid_properties = Array.new 52 | invalid_properties 53 | end 54 | 55 | # Check to see if the all the properties in the model are valid 56 | # @return true if the model is valid 57 | def valid? 58 | true 59 | end 60 | 61 | # Checks equality by comparing each attribute. 62 | # @param [Object] Object to be compared 63 | def ==(o) 64 | return true if self.equal?(o) 65 | self.class == o.class && 66 | file_types == o.file_types 67 | end 68 | 69 | # @see the `==` method 70 | # @param [Object] Object to be compared 71 | def eql?(o) 72 | self == o 73 | end 74 | 75 | # Calculates hash code according to all attributes. 76 | # @return [Fixnum] Hash code 77 | def hash 78 | [file_types].hash 79 | end 80 | 81 | # Builds the object from hash 82 | # @param [Hash] attributes Model attributes in the form of hash 83 | # @return [Object] Returns the model itself 84 | def build_from_hash(attributes) 85 | return nil unless attributes.is_a?(Hash) 86 | self.class.swagger_types.each_pair do |key, type| 87 | if type =~ /\AArray<(.*)>/i 88 | # check to ensure the input is an array given that the attribute 89 | # is documented as an array but the input is not 90 | if attributes[self.class.attribute_map[key]].is_a?(Array) 91 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 92 | end 93 | elsif !attributes[self.class.attribute_map[key]].nil? 94 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 95 | end # or else data not found in attributes(hash), not an issue as the data can be optional 96 | end 97 | 98 | self 99 | end 100 | 101 | # Deserializes the data based on type 102 | # @param string type Data type 103 | # @param string value Value to be deserialized 104 | # @return [Object] Deserialized data 105 | def _deserialize(type, value) 106 | case type.to_sym 107 | when :DateTime 108 | DateTime.parse(value) 109 | when :Date 110 | Date.parse(value) 111 | when :String 112 | value.to_s 113 | when :Integer 114 | value.to_i 115 | when :Float 116 | value.to_f 117 | when :BOOLEAN 118 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 119 | true 120 | else 121 | false 122 | end 123 | when :Object 124 | # generic object (usually a Hash), return directly 125 | value 126 | when /\AArray<(?.+)>\z/ 127 | inner_type = Regexp.last_match[:inner_type] 128 | value.map { |v| _deserialize(inner_type, v) } 129 | when /\AHash<(?.+?), (?.+)>\z/ 130 | k_type = Regexp.last_match[:k_type] 131 | v_type = Regexp.last_match[:v_type] 132 | {}.tap do |hash| 133 | value.each do |k, v| 134 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 135 | end 136 | end 137 | else # model 138 | temp_model = DocuSign_eSign.const_get(type).new 139 | temp_model.build_from_hash(value) 140 | end 141 | end 142 | 143 | # Returns the string representation of the object 144 | # @return [String] String presentation of the object 145 | def to_s 146 | to_hash.to_s 147 | end 148 | 149 | # to_body is an alias to to_hash (backward compatibility) 150 | # @return [Hash] Returns the object in the form of hash 151 | def to_body 152 | to_hash 153 | end 154 | 155 | # Returns the object in the form of hash 156 | # @return [Hash] Returns the object in the form of hash 157 | def to_hash 158 | hash = {} 159 | self.class.attribute_map.each_pair do |attr, param| 160 | value = self.send(attr) 161 | next if value.nil? 162 | hash[param] = _to_hash(value) 163 | end 164 | hash 165 | end 166 | 167 | # Outputs non-array value in the form of hash 168 | # For object, use to_hash. Otherwise, just return the value 169 | # @param [Object] value Any valid value 170 | # @return [Hash] Returns the value in the form of hash 171 | def _to_hash(value) 172 | if value.is_a?(Array) 173 | value.compact.map { |v| _to_hash(v) } 174 | elsif value.is_a?(Hash) 175 | {}.tap do |hash| 176 | value.each { |k, v| hash[k] = _to_hash(v) } 177 | end 178 | elsif value.respond_to? :to_hash 179 | value.to_hash 180 | else 181 | value 182 | end 183 | end 184 | 185 | end 186 | end 187 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/id_check_security_step.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class IdCheckSecurityStep 16 | # 17 | attr_accessor :auth_type 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'auth_type' => :'authType' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'auth_type' => :'String' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'authType') 42 | self.auth_type = attributes[:'authType'] 43 | end 44 | end 45 | 46 | # Show invalid properties with the reasons. Usually used together with valid? 47 | # @return Array for valid properties with the reasons 48 | def list_invalid_properties 49 | invalid_properties = Array.new 50 | invalid_properties 51 | end 52 | 53 | # Check to see if the all the properties in the model are valid 54 | # @return true if the model is valid 55 | def valid? 56 | true 57 | end 58 | 59 | # Checks equality by comparing each attribute. 60 | # @param [Object] Object to be compared 61 | def ==(o) 62 | return true if self.equal?(o) 63 | self.class == o.class && 64 | auth_type == o.auth_type 65 | end 66 | 67 | # @see the `==` method 68 | # @param [Object] Object to be compared 69 | def eql?(o) 70 | self == o 71 | end 72 | 73 | # Calculates hash code according to all attributes. 74 | # @return [Fixnum] Hash code 75 | def hash 76 | [auth_type].hash 77 | end 78 | 79 | # Builds the object from hash 80 | # @param [Hash] attributes Model attributes in the form of hash 81 | # @return [Object] Returns the model itself 82 | def build_from_hash(attributes) 83 | return nil unless attributes.is_a?(Hash) 84 | self.class.swagger_types.each_pair do |key, type| 85 | if type =~ /\AArray<(.*)>/i 86 | # check to ensure the input is an array given that the attribute 87 | # is documented as an array but the input is not 88 | if attributes[self.class.attribute_map[key]].is_a?(Array) 89 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 90 | end 91 | elsif !attributes[self.class.attribute_map[key]].nil? 92 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 93 | end # or else data not found in attributes(hash), not an issue as the data can be optional 94 | end 95 | 96 | self 97 | end 98 | 99 | # Deserializes the data based on type 100 | # @param string type Data type 101 | # @param string value Value to be deserialized 102 | # @return [Object] Deserialized data 103 | def _deserialize(type, value) 104 | case type.to_sym 105 | when :DateTime 106 | DateTime.parse(value) 107 | when :Date 108 | Date.parse(value) 109 | when :String 110 | value.to_s 111 | when :Integer 112 | value.to_i 113 | when :Float 114 | value.to_f 115 | when :BOOLEAN 116 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 117 | true 118 | else 119 | false 120 | end 121 | when :Object 122 | # generic object (usually a Hash), return directly 123 | value 124 | when /\AArray<(?.+)>\z/ 125 | inner_type = Regexp.last_match[:inner_type] 126 | value.map { |v| _deserialize(inner_type, v) } 127 | when /\AHash<(?.+?), (?.+)>\z/ 128 | k_type = Regexp.last_match[:k_type] 129 | v_type = Regexp.last_match[:v_type] 130 | {}.tap do |hash| 131 | value.each do |k, v| 132 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 133 | end 134 | end 135 | else # model 136 | temp_model = DocuSign_eSign.const_get(type).new 137 | temp_model.build_from_hash(value) 138 | end 139 | end 140 | 141 | # Returns the string representation of the object 142 | # @return [String] String presentation of the object 143 | def to_s 144 | to_hash.to_s 145 | end 146 | 147 | # to_body is an alias to to_hash (backward compatibility) 148 | # @return [Hash] Returns the object in the form of hash 149 | def to_body 150 | to_hash 151 | end 152 | 153 | # Returns the object in the form of hash 154 | # @return [Hash] Returns the object in the form of hash 155 | def to_hash 156 | hash = {} 157 | self.class.attribute_map.each_pair do |attr, param| 158 | value = self.send(attr) 159 | next if value.nil? 160 | hash[param] = _to_hash(value) 161 | end 162 | hash 163 | end 164 | 165 | # Outputs non-array value in the form of hash 166 | # For object, use to_hash. Otherwise, just return the value 167 | # @param [Object] value Any valid value 168 | # @return [Hash] Returns the value in the form of hash 169 | def _to_hash(value) 170 | if value.is_a?(Array) 171 | value.compact.map { |v| _to_hash(v) } 172 | elsif value.is_a?(Hash) 173 | {}.tap do |hash| 174 | value.each { |k, v| hash[k] = _to_hash(v) } 175 | end 176 | elsif value.respond_to? :to_hash 177 | value.to_hash 178 | else 179 | value 180 | end 181 | end 182 | 183 | end 184 | end 185 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/id_evidence_view_link.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class IdEvidenceViewLink 16 | # 17 | attr_accessor :view_link 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'view_link' => :'viewLink' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'view_link' => :'String' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'viewLink') 42 | self.view_link = attributes[:'viewLink'] 43 | end 44 | end 45 | 46 | # Show invalid properties with the reasons. Usually used together with valid? 47 | # @return Array for valid properties with the reasons 48 | def list_invalid_properties 49 | invalid_properties = Array.new 50 | invalid_properties 51 | end 52 | 53 | # Check to see if the all the properties in the model are valid 54 | # @return true if the model is valid 55 | def valid? 56 | true 57 | end 58 | 59 | # Checks equality by comparing each attribute. 60 | # @param [Object] Object to be compared 61 | def ==(o) 62 | return true if self.equal?(o) 63 | self.class == o.class && 64 | view_link == o.view_link 65 | end 66 | 67 | # @see the `==` method 68 | # @param [Object] Object to be compared 69 | def eql?(o) 70 | self == o 71 | end 72 | 73 | # Calculates hash code according to all attributes. 74 | # @return [Fixnum] Hash code 75 | def hash 76 | [view_link].hash 77 | end 78 | 79 | # Builds the object from hash 80 | # @param [Hash] attributes Model attributes in the form of hash 81 | # @return [Object] Returns the model itself 82 | def build_from_hash(attributes) 83 | return nil unless attributes.is_a?(Hash) 84 | self.class.swagger_types.each_pair do |key, type| 85 | if type =~ /\AArray<(.*)>/i 86 | # check to ensure the input is an array given that the attribute 87 | # is documented as an array but the input is not 88 | if attributes[self.class.attribute_map[key]].is_a?(Array) 89 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 90 | end 91 | elsif !attributes[self.class.attribute_map[key]].nil? 92 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 93 | end # or else data not found in attributes(hash), not an issue as the data can be optional 94 | end 95 | 96 | self 97 | end 98 | 99 | # Deserializes the data based on type 100 | # @param string type Data type 101 | # @param string value Value to be deserialized 102 | # @return [Object] Deserialized data 103 | def _deserialize(type, value) 104 | case type.to_sym 105 | when :DateTime 106 | DateTime.parse(value) 107 | when :Date 108 | Date.parse(value) 109 | when :String 110 | value.to_s 111 | when :Integer 112 | value.to_i 113 | when :Float 114 | value.to_f 115 | when :BOOLEAN 116 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 117 | true 118 | else 119 | false 120 | end 121 | when :Object 122 | # generic object (usually a Hash), return directly 123 | value 124 | when /\AArray<(?.+)>\z/ 125 | inner_type = Regexp.last_match[:inner_type] 126 | value.map { |v| _deserialize(inner_type, v) } 127 | when /\AHash<(?.+?), (?.+)>\z/ 128 | k_type = Regexp.last_match[:k_type] 129 | v_type = Regexp.last_match[:v_type] 130 | {}.tap do |hash| 131 | value.each do |k, v| 132 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 133 | end 134 | end 135 | else # model 136 | temp_model = DocuSign_eSign.const_get(type).new 137 | temp_model.build_from_hash(value) 138 | end 139 | end 140 | 141 | # Returns the string representation of the object 142 | # @return [String] String presentation of the object 143 | def to_s 144 | to_hash.to_s 145 | end 146 | 147 | # to_body is an alias to to_hash (backward compatibility) 148 | # @return [Hash] Returns the object in the form of hash 149 | def to_body 150 | to_hash 151 | end 152 | 153 | # Returns the object in the form of hash 154 | # @return [Hash] Returns the object in the form of hash 155 | def to_hash 156 | hash = {} 157 | self.class.attribute_map.each_pair do |attr, param| 158 | value = self.send(attr) 159 | next if value.nil? 160 | hash[param] = _to_hash(value) 161 | end 162 | hash 163 | end 164 | 165 | # Outputs non-array value in the form of hash 166 | # For object, use to_hash. Otherwise, just return the value 167 | # @param [Object] value Any valid value 168 | # @return [Hash] Returns the value in the form of hash 169 | def _to_hash(value) 170 | if value.is_a?(Array) 171 | value.compact.map { |v| _to_hash(v) } 172 | elsif value.is_a?(Hash) 173 | {}.tap do |hash| 174 | value.each { |k, v| hash[k] = _to_hash(v) } 175 | end 176 | elsif value.respond_to? :to_hash 177 | value.to_hash 178 | else 179 | value 180 | end 181 | end 182 | 183 | end 184 | end 185 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/new_users_definition.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class NewUsersDefinition 16 | # 17 | attr_accessor :new_users 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'new_users' => :'newUsers' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'new_users' => :'Array' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'newUsers') 42 | if (value = attributes[:'newUsers']).is_a?(Array) 43 | self.new_users = value 44 | end 45 | end 46 | end 47 | 48 | # Show invalid properties with the reasons. Usually used together with valid? 49 | # @return Array for valid properties with the reasons 50 | def list_invalid_properties 51 | invalid_properties = Array.new 52 | invalid_properties 53 | end 54 | 55 | # Check to see if the all the properties in the model are valid 56 | # @return true if the model is valid 57 | def valid? 58 | true 59 | end 60 | 61 | # Checks equality by comparing each attribute. 62 | # @param [Object] Object to be compared 63 | def ==(o) 64 | return true if self.equal?(o) 65 | self.class == o.class && 66 | new_users == o.new_users 67 | end 68 | 69 | # @see the `==` method 70 | # @param [Object] Object to be compared 71 | def eql?(o) 72 | self == o 73 | end 74 | 75 | # Calculates hash code according to all attributes. 76 | # @return [Fixnum] Hash code 77 | def hash 78 | [new_users].hash 79 | end 80 | 81 | # Builds the object from hash 82 | # @param [Hash] attributes Model attributes in the form of hash 83 | # @return [Object] Returns the model itself 84 | def build_from_hash(attributes) 85 | return nil unless attributes.is_a?(Hash) 86 | self.class.swagger_types.each_pair do |key, type| 87 | if type =~ /\AArray<(.*)>/i 88 | # check to ensure the input is an array given that the attribute 89 | # is documented as an array but the input is not 90 | if attributes[self.class.attribute_map[key]].is_a?(Array) 91 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 92 | end 93 | elsif !attributes[self.class.attribute_map[key]].nil? 94 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 95 | end # or else data not found in attributes(hash), not an issue as the data can be optional 96 | end 97 | 98 | self 99 | end 100 | 101 | # Deserializes the data based on type 102 | # @param string type Data type 103 | # @param string value Value to be deserialized 104 | # @return [Object] Deserialized data 105 | def _deserialize(type, value) 106 | case type.to_sym 107 | when :DateTime 108 | DateTime.parse(value) 109 | when :Date 110 | Date.parse(value) 111 | when :String 112 | value.to_s 113 | when :Integer 114 | value.to_i 115 | when :Float 116 | value.to_f 117 | when :BOOLEAN 118 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 119 | true 120 | else 121 | false 122 | end 123 | when :Object 124 | # generic object (usually a Hash), return directly 125 | value 126 | when /\AArray<(?.+)>\z/ 127 | inner_type = Regexp.last_match[:inner_type] 128 | value.map { |v| _deserialize(inner_type, v) } 129 | when /\AHash<(?.+?), (?.+)>\z/ 130 | k_type = Regexp.last_match[:k_type] 131 | v_type = Regexp.last_match[:v_type] 132 | {}.tap do |hash| 133 | value.each do |k, v| 134 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 135 | end 136 | end 137 | else # model 138 | temp_model = DocuSign_eSign.const_get(type).new 139 | temp_model.build_from_hash(value) 140 | end 141 | end 142 | 143 | # Returns the string representation of the object 144 | # @return [String] String presentation of the object 145 | def to_s 146 | to_hash.to_s 147 | end 148 | 149 | # to_body is an alias to to_hash (backward compatibility) 150 | # @return [Hash] Returns the object in the form of hash 151 | def to_body 152 | to_hash 153 | end 154 | 155 | # Returns the object in the form of hash 156 | # @return [Hash] Returns the object in the form of hash 157 | def to_hash 158 | hash = {} 159 | self.class.attribute_map.each_pair do |attr, param| 160 | value = self.send(attr) 161 | next if value.nil? 162 | hash[param] = _to_hash(value) 163 | end 164 | hash 165 | end 166 | 167 | # Outputs non-array value in the form of hash 168 | # For object, use to_hash. Otherwise, just return the value 169 | # @param [Object] value Any valid value 170 | # @return [Hash] Returns the value in the form of hash 171 | def _to_hash(value) 172 | if value.is_a?(Array) 173 | value.compact.map { |v| _to_hash(v) } 174 | elsif value.is_a?(Hash) 175 | {}.tap do |hash| 176 | value.each { |k, v| hash[k] = _to_hash(v) } 177 | end 178 | elsif value.respond_to? :to_hash 179 | value.to_hash 180 | else 181 | value 182 | end 183 | end 184 | 185 | end 186 | end 187 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/palette_item_settings.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class PaletteItemSettings 16 | # 17 | attr_accessor :show 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'show' => :'show' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'show' => :'String' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'show') 42 | self.show = attributes[:'show'] 43 | end 44 | end 45 | 46 | # Show invalid properties with the reasons. Usually used together with valid? 47 | # @return Array for valid properties with the reasons 48 | def list_invalid_properties 49 | invalid_properties = Array.new 50 | invalid_properties 51 | end 52 | 53 | # Check to see if the all the properties in the model are valid 54 | # @return true if the model is valid 55 | def valid? 56 | true 57 | end 58 | 59 | # Checks equality by comparing each attribute. 60 | # @param [Object] Object to be compared 61 | def ==(o) 62 | return true if self.equal?(o) 63 | self.class == o.class && 64 | show == o.show 65 | end 66 | 67 | # @see the `==` method 68 | # @param [Object] Object to be compared 69 | def eql?(o) 70 | self == o 71 | end 72 | 73 | # Calculates hash code according to all attributes. 74 | # @return [Fixnum] Hash code 75 | def hash 76 | [show].hash 77 | end 78 | 79 | # Builds the object from hash 80 | # @param [Hash] attributes Model attributes in the form of hash 81 | # @return [Object] Returns the model itself 82 | def build_from_hash(attributes) 83 | return nil unless attributes.is_a?(Hash) 84 | self.class.swagger_types.each_pair do |key, type| 85 | if type =~ /\AArray<(.*)>/i 86 | # check to ensure the input is an array given that the attribute 87 | # is documented as an array but the input is not 88 | if attributes[self.class.attribute_map[key]].is_a?(Array) 89 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 90 | end 91 | elsif !attributes[self.class.attribute_map[key]].nil? 92 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 93 | end # or else data not found in attributes(hash), not an issue as the data can be optional 94 | end 95 | 96 | self 97 | end 98 | 99 | # Deserializes the data based on type 100 | # @param string type Data type 101 | # @param string value Value to be deserialized 102 | # @return [Object] Deserialized data 103 | def _deserialize(type, value) 104 | case type.to_sym 105 | when :DateTime 106 | DateTime.parse(value) 107 | when :Date 108 | Date.parse(value) 109 | when :String 110 | value.to_s 111 | when :Integer 112 | value.to_i 113 | when :Float 114 | value.to_f 115 | when :BOOLEAN 116 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 117 | true 118 | else 119 | false 120 | end 121 | when :Object 122 | # generic object (usually a Hash), return directly 123 | value 124 | when /\AArray<(?.+)>\z/ 125 | inner_type = Regexp.last_match[:inner_type] 126 | value.map { |v| _deserialize(inner_type, v) } 127 | when /\AHash<(?.+?), (?.+)>\z/ 128 | k_type = Regexp.last_match[:k_type] 129 | v_type = Regexp.last_match[:v_type] 130 | {}.tap do |hash| 131 | value.each do |k, v| 132 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 133 | end 134 | end 135 | else # model 136 | temp_model = DocuSign_eSign.const_get(type).new 137 | temp_model.build_from_hash(value) 138 | end 139 | end 140 | 141 | # Returns the string representation of the object 142 | # @return [String] String presentation of the object 143 | def to_s 144 | to_hash.to_s 145 | end 146 | 147 | # to_body is an alias to to_hash (backward compatibility) 148 | # @return [Hash] Returns the object in the form of hash 149 | def to_body 150 | to_hash 151 | end 152 | 153 | # Returns the object in the form of hash 154 | # @return [Hash] Returns the object in the form of hash 155 | def to_hash 156 | hash = {} 157 | self.class.attribute_map.each_pair do |attr, param| 158 | value = self.send(attr) 159 | next if value.nil? 160 | hash[param] = _to_hash(value) 161 | end 162 | hash 163 | end 164 | 165 | # Outputs non-array value in the form of hash 166 | # For object, use to_hash. Otherwise, just return the value 167 | # @param [Object] value Any valid value 168 | # @return [Hash] Returns the value in the form of hash 169 | def _to_hash(value) 170 | if value.is_a?(Array) 171 | value.compact.map { |v| _to_hash(v) } 172 | elsif value.is_a?(Hash) 173 | {}.tap do |hash| 174 | value.each { |k, v| hash[k] = _to_hash(v) } 175 | end 176 | elsif value.respond_to? :to_hash 177 | value.to_hash 178 | else 179 | value 180 | end 181 | end 182 | 183 | end 184 | end 185 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/payment_signer_values.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class PaymentSignerValues 16 | # 17 | attr_accessor :payment_option 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'payment_option' => :'paymentOption' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'payment_option' => :'String' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'paymentOption') 42 | self.payment_option = attributes[:'paymentOption'] 43 | end 44 | end 45 | 46 | # Show invalid properties with the reasons. Usually used together with valid? 47 | # @return Array for valid properties with the reasons 48 | def list_invalid_properties 49 | invalid_properties = Array.new 50 | invalid_properties 51 | end 52 | 53 | # Check to see if the all the properties in the model are valid 54 | # @return true if the model is valid 55 | def valid? 56 | true 57 | end 58 | 59 | # Checks equality by comparing each attribute. 60 | # @param [Object] Object to be compared 61 | def ==(o) 62 | return true if self.equal?(o) 63 | self.class == o.class && 64 | payment_option == o.payment_option 65 | end 66 | 67 | # @see the `==` method 68 | # @param [Object] Object to be compared 69 | def eql?(o) 70 | self == o 71 | end 72 | 73 | # Calculates hash code according to all attributes. 74 | # @return [Fixnum] Hash code 75 | def hash 76 | [payment_option].hash 77 | end 78 | 79 | # Builds the object from hash 80 | # @param [Hash] attributes Model attributes in the form of hash 81 | # @return [Object] Returns the model itself 82 | def build_from_hash(attributes) 83 | return nil unless attributes.is_a?(Hash) 84 | self.class.swagger_types.each_pair do |key, type| 85 | if type =~ /\AArray<(.*)>/i 86 | # check to ensure the input is an array given that the attribute 87 | # is documented as an array but the input is not 88 | if attributes[self.class.attribute_map[key]].is_a?(Array) 89 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 90 | end 91 | elsif !attributes[self.class.attribute_map[key]].nil? 92 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 93 | end # or else data not found in attributes(hash), not an issue as the data can be optional 94 | end 95 | 96 | self 97 | end 98 | 99 | # Deserializes the data based on type 100 | # @param string type Data type 101 | # @param string value Value to be deserialized 102 | # @return [Object] Deserialized data 103 | def _deserialize(type, value) 104 | case type.to_sym 105 | when :DateTime 106 | DateTime.parse(value) 107 | when :Date 108 | Date.parse(value) 109 | when :String 110 | value.to_s 111 | when :Integer 112 | value.to_i 113 | when :Float 114 | value.to_f 115 | when :BOOLEAN 116 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 117 | true 118 | else 119 | false 120 | end 121 | when :Object 122 | # generic object (usually a Hash), return directly 123 | value 124 | when /\AArray<(?.+)>\z/ 125 | inner_type = Regexp.last_match[:inner_type] 126 | value.map { |v| _deserialize(inner_type, v) } 127 | when /\AHash<(?.+?), (?.+)>\z/ 128 | k_type = Regexp.last_match[:k_type] 129 | v_type = Regexp.last_match[:v_type] 130 | {}.tap do |hash| 131 | value.each do |k, v| 132 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 133 | end 134 | end 135 | else # model 136 | temp_model = DocuSign_eSign.const_get(type).new 137 | temp_model.build_from_hash(value) 138 | end 139 | end 140 | 141 | # Returns the string representation of the object 142 | # @return [String] String presentation of the object 143 | def to_s 144 | to_hash.to_s 145 | end 146 | 147 | # to_body is an alias to to_hash (backward compatibility) 148 | # @return [Hash] Returns the object in the form of hash 149 | def to_body 150 | to_hash 151 | end 152 | 153 | # Returns the object in the form of hash 154 | # @return [Hash] Returns the object in the form of hash 155 | def to_hash 156 | hash = {} 157 | self.class.attribute_map.each_pair do |attr, param| 158 | value = self.send(attr) 159 | next if value.nil? 160 | hash[param] = _to_hash(value) 161 | end 162 | hash 163 | end 164 | 165 | # Outputs non-array value in the form of hash 166 | # For object, use to_hash. Otherwise, just return the value 167 | # @param [Object] value Any valid value 168 | # @return [Hash] Returns the value in the form of hash 169 | def _to_hash(value) 170 | if value.is_a?(Array) 171 | value.compact.map { |v| _to_hash(v) } 172 | elsif value.is_a?(Hash) 173 | {}.tap do |hash| 174 | value.each { |k, v| hash[k] = _to_hash(v) } 175 | end 176 | elsif value.respond_to? :to_hash 177 | value.to_hash 178 | else 179 | value 180 | end 181 | end 182 | 183 | end 184 | end 185 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/power_forms_request.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class PowerFormsRequest 16 | # 17 | attr_accessor :power_forms 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'power_forms' => :'powerForms' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'power_forms' => :'Array' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'powerForms') 42 | if (value = attributes[:'powerForms']).is_a?(Array) 43 | self.power_forms = value 44 | end 45 | end 46 | end 47 | 48 | # Show invalid properties with the reasons. Usually used together with valid? 49 | # @return Array for valid properties with the reasons 50 | def list_invalid_properties 51 | invalid_properties = Array.new 52 | invalid_properties 53 | end 54 | 55 | # Check to see if the all the properties in the model are valid 56 | # @return true if the model is valid 57 | def valid? 58 | true 59 | end 60 | 61 | # Checks equality by comparing each attribute. 62 | # @param [Object] Object to be compared 63 | def ==(o) 64 | return true if self.equal?(o) 65 | self.class == o.class && 66 | power_forms == o.power_forms 67 | end 68 | 69 | # @see the `==` method 70 | # @param [Object] Object to be compared 71 | def eql?(o) 72 | self == o 73 | end 74 | 75 | # Calculates hash code according to all attributes. 76 | # @return [Fixnum] Hash code 77 | def hash 78 | [power_forms].hash 79 | end 80 | 81 | # Builds the object from hash 82 | # @param [Hash] attributes Model attributes in the form of hash 83 | # @return [Object] Returns the model itself 84 | def build_from_hash(attributes) 85 | return nil unless attributes.is_a?(Hash) 86 | self.class.swagger_types.each_pair do |key, type| 87 | if type =~ /\AArray<(.*)>/i 88 | # check to ensure the input is an array given that the attribute 89 | # is documented as an array but the input is not 90 | if attributes[self.class.attribute_map[key]].is_a?(Array) 91 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 92 | end 93 | elsif !attributes[self.class.attribute_map[key]].nil? 94 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 95 | end # or else data not found in attributes(hash), not an issue as the data can be optional 96 | end 97 | 98 | self 99 | end 100 | 101 | # Deserializes the data based on type 102 | # @param string type Data type 103 | # @param string value Value to be deserialized 104 | # @return [Object] Deserialized data 105 | def _deserialize(type, value) 106 | case type.to_sym 107 | when :DateTime 108 | DateTime.parse(value) 109 | when :Date 110 | Date.parse(value) 111 | when :String 112 | value.to_s 113 | when :Integer 114 | value.to_i 115 | when :Float 116 | value.to_f 117 | when :BOOLEAN 118 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 119 | true 120 | else 121 | false 122 | end 123 | when :Object 124 | # generic object (usually a Hash), return directly 125 | value 126 | when /\AArray<(?.+)>\z/ 127 | inner_type = Regexp.last_match[:inner_type] 128 | value.map { |v| _deserialize(inner_type, v) } 129 | when /\AHash<(?.+?), (?.+)>\z/ 130 | k_type = Regexp.last_match[:k_type] 131 | v_type = Regexp.last_match[:v_type] 132 | {}.tap do |hash| 133 | value.each do |k, v| 134 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 135 | end 136 | end 137 | else # model 138 | temp_model = DocuSign_eSign.const_get(type).new 139 | temp_model.build_from_hash(value) 140 | end 141 | end 142 | 143 | # Returns the string representation of the object 144 | # @return [String] String presentation of the object 145 | def to_s 146 | to_hash.to_s 147 | end 148 | 149 | # to_body is an alias to to_hash (backward compatibility) 150 | # @return [Hash] Returns the object in the form of hash 151 | def to_body 152 | to_hash 153 | end 154 | 155 | # Returns the object in the form of hash 156 | # @return [Hash] Returns the object in the form of hash 157 | def to_hash 158 | hash = {} 159 | self.class.attribute_map.each_pair do |attr, param| 160 | value = self.send(attr) 161 | next if value.nil? 162 | hash[param] = _to_hash(value) 163 | end 164 | hash 165 | end 166 | 167 | # Outputs non-array value in the form of hash 168 | # For object, use to_hash. Otherwise, just return the value 169 | # @param [Object] value Any valid value 170 | # @return [Hash] Returns the value in the form of hash 171 | def _to_hash(value) 172 | if value.is_a?(Array) 173 | value.compact.map { |v| _to_hash(v) } 174 | elsif value.is_a?(Hash) 175 | {}.tap do |hash| 176 | value.each { |k, v| hash[k] = _to_hash(v) } 177 | end 178 | elsif value.respond_to? :to_hash 179 | value.to_hash 180 | else 181 | value 182 | end 183 | end 184 | 185 | end 186 | end 187 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/proof_service_view_link.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign REST API 3 | 4 | #The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class ProofServiceViewLink 16 | # 17 | attr_accessor :view_link 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'view_link' => :'ViewLink' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'view_link' => :'String' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'ViewLink') 42 | self.view_link = attributes[:'ViewLink'] 43 | end 44 | end 45 | 46 | # Show invalid properties with the reasons. Usually used together with valid? 47 | # @return Array for valid properties with the reasons 48 | def list_invalid_properties 49 | invalid_properties = Array.new 50 | invalid_properties 51 | end 52 | 53 | # Check to see if the all the properties in the model are valid 54 | # @return true if the model is valid 55 | def valid? 56 | true 57 | end 58 | 59 | # Checks equality by comparing each attribute. 60 | # @param [Object] Object to be compared 61 | def ==(o) 62 | return true if self.equal?(o) 63 | self.class == o.class && 64 | view_link == o.view_link 65 | end 66 | 67 | # @see the `==` method 68 | # @param [Object] Object to be compared 69 | def eql?(o) 70 | self == o 71 | end 72 | 73 | # Calculates hash code according to all attributes. 74 | # @return [Fixnum] Hash code 75 | def hash 76 | [view_link].hash 77 | end 78 | 79 | # Builds the object from hash 80 | # @param [Hash] attributes Model attributes in the form of hash 81 | # @return [Object] Returns the model itself 82 | def build_from_hash(attributes) 83 | return nil unless attributes.is_a?(Hash) 84 | self.class.swagger_types.each_pair do |key, type| 85 | if type =~ /\AArray<(.*)>/i 86 | # check to ensure the input is an array given that the attribute 87 | # is documented as an array but the input is not 88 | if attributes[self.class.attribute_map[key]].is_a?(Array) 89 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 90 | end 91 | elsif !attributes[self.class.attribute_map[key]].nil? 92 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 93 | end # or else data not found in attributes(hash), not an issue as the data can be optional 94 | end 95 | 96 | self 97 | end 98 | 99 | # Deserializes the data based on type 100 | # @param string type Data type 101 | # @param string value Value to be deserialized 102 | # @return [Object] Deserialized data 103 | def _deserialize(type, value) 104 | case type.to_sym 105 | when :DateTime 106 | DateTime.parse(value) 107 | when :Date 108 | Date.parse(value) 109 | when :String 110 | value.to_s 111 | when :Integer 112 | value.to_i 113 | when :Float 114 | value.to_f 115 | when :BOOLEAN 116 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 117 | true 118 | else 119 | false 120 | end 121 | when :Object 122 | # generic object (usually a Hash), return directly 123 | value 124 | when /\AArray<(?.+)>\z/ 125 | inner_type = Regexp.last_match[:inner_type] 126 | value.map { |v| _deserialize(inner_type, v) } 127 | when /\AHash<(?.+?), (?.+)>\z/ 128 | k_type = Regexp.last_match[:k_type] 129 | v_type = Regexp.last_match[:v_type] 130 | {}.tap do |hash| 131 | value.each do |k, v| 132 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 133 | end 134 | end 135 | else # model 136 | temp_model = DocuSign_eSign.const_get(type).new 137 | temp_model.build_from_hash(value) 138 | end 139 | end 140 | 141 | # Returns the string representation of the object 142 | # @return [String] String presentation of the object 143 | def to_s 144 | to_hash.to_s 145 | end 146 | 147 | # to_body is an alias to to_hash (backward compatibility) 148 | # @return [Hash] Returns the object in the form of hash 149 | def to_body 150 | to_hash 151 | end 152 | 153 | # Returns the object in the form of hash 154 | # @return [Hash] Returns the object in the form of hash 155 | def to_hash 156 | hash = {} 157 | self.class.attribute_map.each_pair do |attr, param| 158 | value = self.send(attr) 159 | next if value.nil? 160 | hash[param] = _to_hash(value) 161 | end 162 | hash 163 | end 164 | 165 | # Outputs non-array value in the form of hash 166 | # For object, use to_hash. Otherwise, just return the value 167 | # @param [Object] value Any valid value 168 | # @return [Hash] Returns the value in the form of hash 169 | def _to_hash(value) 170 | if value.is_a?(Array) 171 | value.compact.map { |v| _to_hash(v) } 172 | elsif value.is_a?(Hash) 173 | {}.tap do |hash| 174 | value.each { |k, v| hash[k] = _to_hash(v) } 175 | end 176 | elsif value.respond_to? :to_hash 177 | value.to_hash 178 | else 179 | value 180 | end 181 | end 182 | 183 | end 184 | end 185 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/recipient_routing.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | # Describes the recipient routing rules. 16 | class RecipientRouting 17 | # The recipient routing rules. 18 | attr_accessor :rules 19 | 20 | # Attribute mapping from ruby-style variable name to JSON key. 21 | def self.attribute_map 22 | { 23 | :'rules' => :'rules' 24 | } 25 | end 26 | 27 | # Attribute type mapping. 28 | def self.swagger_types 29 | { 30 | :'rules' => :'RecipientRules' 31 | } 32 | end 33 | 34 | # Initializes the object 35 | # @param [Hash] attributes Model attributes in the form of hash 36 | def initialize(attributes = {}) 37 | return unless attributes.is_a?(Hash) 38 | 39 | # convert string to symbol for hash key 40 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 41 | 42 | if attributes.has_key?(:'rules') 43 | self.rules = attributes[:'rules'] 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 | rules == o.rules 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 | [rules].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_eSign.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_esign/models/report_in_product_list.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign REST API 3 | 4 | #The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class ReportInProductList 16 | # 17 | attr_accessor :reports 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'reports' => :'reports' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'reports' => :'Array' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'reports') 42 | if (value = attributes[:'reports']).is_a?(Array) 43 | self.reports = value 44 | end 45 | end 46 | end 47 | 48 | # Show invalid properties with the reasons. Usually used together with valid? 49 | # @return Array for valid properties with the reasons 50 | def list_invalid_properties 51 | invalid_properties = Array.new 52 | invalid_properties 53 | end 54 | 55 | # Check to see if the all the properties in the model are valid 56 | # @return true if the model is valid 57 | def valid? 58 | true 59 | end 60 | 61 | # Checks equality by comparing each attribute. 62 | # @param [Object] Object to be compared 63 | def ==(o) 64 | return true if self.equal?(o) 65 | self.class == o.class && 66 | reports == o.reports 67 | end 68 | 69 | # @see the `==` method 70 | # @param [Object] Object to be compared 71 | def eql?(o) 72 | self == o 73 | end 74 | 75 | # Calculates hash code according to all attributes. 76 | # @return [Fixnum] Hash code 77 | def hash 78 | [reports].hash 79 | end 80 | 81 | # Builds the object from hash 82 | # @param [Hash] attributes Model attributes in the form of hash 83 | # @return [Object] Returns the model itself 84 | def build_from_hash(attributes) 85 | return nil unless attributes.is_a?(Hash) 86 | self.class.swagger_types.each_pair do |key, type| 87 | if type =~ /\AArray<(.*)>/i 88 | # check to ensure the input is an array given that the attribute 89 | # is documented as an array but the input is not 90 | if attributes[self.class.attribute_map[key]].is_a?(Array) 91 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 92 | end 93 | elsif !attributes[self.class.attribute_map[key]].nil? 94 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 95 | end # or else data not found in attributes(hash), not an issue as the data can be optional 96 | end 97 | 98 | self 99 | end 100 | 101 | # Deserializes the data based on type 102 | # @param string type Data type 103 | # @param string value Value to be deserialized 104 | # @return [Object] Deserialized data 105 | def _deserialize(type, value) 106 | case type.to_sym 107 | when :DateTime 108 | DateTime.parse(value) 109 | when :Date 110 | Date.parse(value) 111 | when :String 112 | value.to_s 113 | when :Integer 114 | value.to_i 115 | when :Float 116 | value.to_f 117 | when :BOOLEAN 118 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 119 | true 120 | else 121 | false 122 | end 123 | when :Object 124 | # generic object (usually a Hash), return directly 125 | value 126 | when /\AArray<(?.+)>\z/ 127 | inner_type = Regexp.last_match[:inner_type] 128 | value.map { |v| _deserialize(inner_type, v) } 129 | when /\AHash<(?.+?), (?.+)>\z/ 130 | k_type = Regexp.last_match[:k_type] 131 | v_type = Regexp.last_match[:v_type] 132 | {}.tap do |hash| 133 | value.each do |k, v| 134 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 135 | end 136 | end 137 | else # model 138 | temp_model = DocuSign_eSign.const_get(type).new 139 | temp_model.build_from_hash(value) 140 | end 141 | end 142 | 143 | # Returns the string representation of the object 144 | # @return [String] String presentation of the object 145 | def to_s 146 | to_hash.to_s 147 | end 148 | 149 | # to_body is an alias to to_hash (backward compatibility) 150 | # @return [Hash] Returns the object in the form of hash 151 | def to_body 152 | to_hash 153 | end 154 | 155 | # Returns the object in the form of hash 156 | # @return [Hash] Returns the object in the form of hash 157 | def to_hash 158 | hash = {} 159 | self.class.attribute_map.each_pair do |attr, param| 160 | value = self.send(attr) 161 | next if value.nil? 162 | hash[param] = _to_hash(value) 163 | end 164 | hash 165 | end 166 | 167 | # Outputs non-array value in the form of hash 168 | # For object, use to_hash. Otherwise, just return the value 169 | # @param [Object] value Any valid value 170 | # @return [Hash] Returns the value in the form of hash 171 | def _to_hash(value) 172 | if value.is_a?(Array) 173 | value.compact.map { |v| _to_hash(v) } 174 | elsif value.is_a?(Hash) 175 | {}.tap do |hash| 176 | value.each { |k, v| hash[k] = _to_hash(v) } 177 | end 178 | elsif value.respond_to? :to_hash 179 | value.to_hash 180 | else 181 | value 182 | end 183 | end 184 | 185 | end 186 | end 187 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/resource_information.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class ResourceInformation 16 | # 17 | attr_accessor :resources 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'resources' => :'resources' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'resources' => :'Array' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'resources') 42 | if (value = attributes[:'resources']).is_a?(Array) 43 | self.resources = value 44 | end 45 | end 46 | end 47 | 48 | # Show invalid properties with the reasons. Usually used together with valid? 49 | # @return Array for valid properties with the reasons 50 | def list_invalid_properties 51 | invalid_properties = Array.new 52 | invalid_properties 53 | end 54 | 55 | # Check to see if the all the properties in the model are valid 56 | # @return true if the model is valid 57 | def valid? 58 | true 59 | end 60 | 61 | # Checks equality by comparing each attribute. 62 | # @param [Object] Object to be compared 63 | def ==(o) 64 | return true if self.equal?(o) 65 | self.class == o.class && 66 | resources == o.resources 67 | end 68 | 69 | # @see the `==` method 70 | # @param [Object] Object to be compared 71 | def eql?(o) 72 | self == o 73 | end 74 | 75 | # Calculates hash code according to all attributes. 76 | # @return [Fixnum] Hash code 77 | def hash 78 | [resources].hash 79 | end 80 | 81 | # Builds the object from hash 82 | # @param [Hash] attributes Model attributes in the form of hash 83 | # @return [Object] Returns the model itself 84 | def build_from_hash(attributes) 85 | return nil unless attributes.is_a?(Hash) 86 | self.class.swagger_types.each_pair do |key, type| 87 | if type =~ /\AArray<(.*)>/i 88 | # check to ensure the input is an array given that the attribute 89 | # is documented as an array but the input is not 90 | if attributes[self.class.attribute_map[key]].is_a?(Array) 91 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 92 | end 93 | elsif !attributes[self.class.attribute_map[key]].nil? 94 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 95 | end # or else data not found in attributes(hash), not an issue as the data can be optional 96 | end 97 | 98 | self 99 | end 100 | 101 | # Deserializes the data based on type 102 | # @param string type Data type 103 | # @param string value Value to be deserialized 104 | # @return [Object] Deserialized data 105 | def _deserialize(type, value) 106 | case type.to_sym 107 | when :DateTime 108 | DateTime.parse(value) 109 | when :Date 110 | Date.parse(value) 111 | when :String 112 | value.to_s 113 | when :Integer 114 | value.to_i 115 | when :Float 116 | value.to_f 117 | when :BOOLEAN 118 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 119 | true 120 | else 121 | false 122 | end 123 | when :Object 124 | # generic object (usually a Hash), return directly 125 | value 126 | when /\AArray<(?.+)>\z/ 127 | inner_type = Regexp.last_match[:inner_type] 128 | value.map { |v| _deserialize(inner_type, v) } 129 | when /\AHash<(?.+?), (?.+)>\z/ 130 | k_type = Regexp.last_match[:k_type] 131 | v_type = Regexp.last_match[:v_type] 132 | {}.tap do |hash| 133 | value.each do |k, v| 134 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 135 | end 136 | end 137 | else # model 138 | temp_model = DocuSign_eSign.const_get(type).new 139 | temp_model.build_from_hash(value) 140 | end 141 | end 142 | 143 | # Returns the string representation of the object 144 | # @return [String] String presentation of the object 145 | def to_s 146 | to_hash.to_s 147 | end 148 | 149 | # to_body is an alias to to_hash (backward compatibility) 150 | # @return [Hash] Returns the object in the form of hash 151 | def to_body 152 | to_hash 153 | end 154 | 155 | # Returns the object in the form of hash 156 | # @return [Hash] Returns the object in the form of hash 157 | def to_hash 158 | hash = {} 159 | self.class.attribute_map.each_pair do |attr, param| 160 | value = self.send(attr) 161 | next if value.nil? 162 | hash[param] = _to_hash(value) 163 | end 164 | hash 165 | end 166 | 167 | # Outputs non-array value in the form of hash 168 | # For object, use to_hash. Otherwise, just return the value 169 | # @param [Object] value Any valid value 170 | # @return [Hash] Returns the value in the form of hash 171 | def _to_hash(value) 172 | if value.is_a?(Array) 173 | value.compact.map { |v| _to_hash(v) } 174 | elsif value.is_a?(Hash) 175 | {}.tap do |hash| 176 | value.each { |k, v| hash[k] = _to_hash(v) } 177 | end 178 | elsif value.respond_to? :to_hash 179 | value.to_hash 180 | else 181 | value 182 | end 183 | end 184 | 185 | end 186 | end 187 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/signing_group_users.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class SigningGroupUsers 16 | # 17 | attr_accessor :users 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'users' => :'users' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'users' => :'Array' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'users') 42 | if (value = attributes[:'users']).is_a?(Array) 43 | self.users = value 44 | end 45 | end 46 | end 47 | 48 | # Show invalid properties with the reasons. Usually used together with valid? 49 | # @return Array for valid properties with the reasons 50 | def list_invalid_properties 51 | invalid_properties = Array.new 52 | invalid_properties 53 | end 54 | 55 | # Check to see if the all the properties in the model are valid 56 | # @return true if the model is valid 57 | def valid? 58 | true 59 | end 60 | 61 | # Checks equality by comparing each attribute. 62 | # @param [Object] Object to be compared 63 | def ==(o) 64 | return true if self.equal?(o) 65 | self.class == o.class && 66 | users == o.users 67 | end 68 | 69 | # @see the `==` method 70 | # @param [Object] Object to be compared 71 | def eql?(o) 72 | self == o 73 | end 74 | 75 | # Calculates hash code according to all attributes. 76 | # @return [Fixnum] Hash code 77 | def hash 78 | [users].hash 79 | end 80 | 81 | # Builds the object from hash 82 | # @param [Hash] attributes Model attributes in the form of hash 83 | # @return [Object] Returns the model itself 84 | def build_from_hash(attributes) 85 | return nil unless attributes.is_a?(Hash) 86 | self.class.swagger_types.each_pair do |key, type| 87 | if type =~ /\AArray<(.*)>/i 88 | # check to ensure the input is an array given that the attribute 89 | # is documented as an array but the input is not 90 | if attributes[self.class.attribute_map[key]].is_a?(Array) 91 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 92 | end 93 | elsif !attributes[self.class.attribute_map[key]].nil? 94 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 95 | end # or else data not found in attributes(hash), not an issue as the data can be optional 96 | end 97 | 98 | self 99 | end 100 | 101 | # Deserializes the data based on type 102 | # @param string type Data type 103 | # @param string value Value to be deserialized 104 | # @return [Object] Deserialized data 105 | def _deserialize(type, value) 106 | case type.to_sym 107 | when :DateTime 108 | DateTime.parse(value) 109 | when :Date 110 | Date.parse(value) 111 | when :String 112 | value.to_s 113 | when :Integer 114 | value.to_i 115 | when :Float 116 | value.to_f 117 | when :BOOLEAN 118 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 119 | true 120 | else 121 | false 122 | end 123 | when :Object 124 | # generic object (usually a Hash), return directly 125 | value 126 | when /\AArray<(?.+)>\z/ 127 | inner_type = Regexp.last_match[:inner_type] 128 | value.map { |v| _deserialize(inner_type, v) } 129 | when /\AHash<(?.+?), (?.+)>\z/ 130 | k_type = Regexp.last_match[:k_type] 131 | v_type = Regexp.last_match[:v_type] 132 | {}.tap do |hash| 133 | value.each do |k, v| 134 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 135 | end 136 | end 137 | else # model 138 | temp_model = DocuSign_eSign.const_get(type).new 139 | temp_model.build_from_hash(value) 140 | end 141 | end 142 | 143 | # Returns the string representation of the object 144 | # @return [String] String presentation of the object 145 | def to_s 146 | to_hash.to_s 147 | end 148 | 149 | # to_body is an alias to to_hash (backward compatibility) 150 | # @return [Hash] Returns the object in the form of hash 151 | def to_body 152 | to_hash 153 | end 154 | 155 | # Returns the object in the form of hash 156 | # @return [Hash] Returns the object in the form of hash 157 | def to_hash 158 | hash = {} 159 | self.class.attribute_map.each_pair do |attr, param| 160 | value = self.send(attr) 161 | next if value.nil? 162 | hash[param] = _to_hash(value) 163 | end 164 | hash 165 | end 166 | 167 | # Outputs non-array value in the form of hash 168 | # For object, use to_hash. Otherwise, just return the value 169 | # @param [Object] value Any valid value 170 | # @return [Hash] Returns the value in the form of hash 171 | def _to_hash(value) 172 | if value.is_a?(Array) 173 | value.compact.map { |v| _to_hash(v) } 174 | elsif value.is_a?(Hash) 175 | {}.tap do |hash| 176 | value.each { |k, v| hash[k] = _to_hash(v) } 177 | end 178 | elsif value.respond_to? :to_hash 179 | value.to_hash 180 | else 181 | value 182 | end 183 | end 184 | 185 | end 186 | end 187 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/social_authentication.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class SocialAuthentication 16 | # Reserved: TBD 17 | attr_accessor :authentication 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'authentication' => :'authentication' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'authentication' => :'String' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'authentication') 42 | self.authentication = attributes[:'authentication'] 43 | end 44 | end 45 | 46 | # Show invalid properties with the reasons. Usually used together with valid? 47 | # @return Array for valid properties with the reasons 48 | def list_invalid_properties 49 | invalid_properties = Array.new 50 | invalid_properties 51 | end 52 | 53 | # Check to see if the all the properties in the model are valid 54 | # @return true if the model is valid 55 | def valid? 56 | true 57 | end 58 | 59 | # Checks equality by comparing each attribute. 60 | # @param [Object] Object to be compared 61 | def ==(o) 62 | return true if self.equal?(o) 63 | self.class == o.class && 64 | authentication == o.authentication 65 | end 66 | 67 | # @see the `==` method 68 | # @param [Object] Object to be compared 69 | def eql?(o) 70 | self == o 71 | end 72 | 73 | # Calculates hash code according to all attributes. 74 | # @return [Fixnum] Hash code 75 | def hash 76 | [authentication].hash 77 | end 78 | 79 | # Builds the object from hash 80 | # @param [Hash] attributes Model attributes in the form of hash 81 | # @return [Object] Returns the model itself 82 | def build_from_hash(attributes) 83 | return nil unless attributes.is_a?(Hash) 84 | self.class.swagger_types.each_pair do |key, type| 85 | if type =~ /\AArray<(.*)>/i 86 | # check to ensure the input is an array given that the attribute 87 | # is documented as an array but the input is not 88 | if attributes[self.class.attribute_map[key]].is_a?(Array) 89 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 90 | end 91 | elsif !attributes[self.class.attribute_map[key]].nil? 92 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 93 | end # or else data not found in attributes(hash), not an issue as the data can be optional 94 | end 95 | 96 | self 97 | end 98 | 99 | # Deserializes the data based on type 100 | # @param string type Data type 101 | # @param string value Value to be deserialized 102 | # @return [Object] Deserialized data 103 | def _deserialize(type, value) 104 | case type.to_sym 105 | when :DateTime 106 | DateTime.parse(value) 107 | when :Date 108 | Date.parse(value) 109 | when :String 110 | value.to_s 111 | when :Integer 112 | value.to_i 113 | when :Float 114 | value.to_f 115 | when :BOOLEAN 116 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 117 | true 118 | else 119 | false 120 | end 121 | when :Object 122 | # generic object (usually a Hash), return directly 123 | value 124 | when /\AArray<(?.+)>\z/ 125 | inner_type = Regexp.last_match[:inner_type] 126 | value.map { |v| _deserialize(inner_type, v) } 127 | when /\AHash<(?.+?), (?.+)>\z/ 128 | k_type = Regexp.last_match[:k_type] 129 | v_type = Regexp.last_match[:v_type] 130 | {}.tap do |hash| 131 | value.each do |k, v| 132 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 133 | end 134 | end 135 | else # model 136 | temp_model = DocuSign_eSign.const_get(type).new 137 | temp_model.build_from_hash(value) 138 | end 139 | end 140 | 141 | # Returns the string representation of the object 142 | # @return [String] String presentation of the object 143 | def to_s 144 | to_hash.to_s 145 | end 146 | 147 | # to_body is an alias to to_hash (backward compatibility) 148 | # @return [Hash] Returns the object in the form of hash 149 | def to_body 150 | to_hash 151 | end 152 | 153 | # Returns the object in the form of hash 154 | # @return [Hash] Returns the object in the form of hash 155 | def to_hash 156 | hash = {} 157 | self.class.attribute_map.each_pair do |attr, param| 158 | value = self.send(attr) 159 | next if value.nil? 160 | hash[param] = _to_hash(value) 161 | end 162 | hash 163 | end 164 | 165 | # Outputs non-array value in the form of hash 166 | # For object, use to_hash. Otherwise, just return the value 167 | # @param [Object] value Any valid value 168 | # @return [Hash] Returns the value in the form of hash 169 | def _to_hash(value) 170 | if value.is_a?(Array) 171 | value.compact.map { |v| _to_hash(v) } 172 | elsif value.is_a?(Hash) 173 | {}.tap do |hash| 174 | value.each { |k, v| hash[k] = _to_hash(v) } 175 | end 176 | elsif value.respond_to? :to_hash 177 | value.to_hash 178 | else 179 | value 180 | end 181 | end 182 | 183 | end 184 | end 185 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/tab_metadata_list.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class TabMetadataList 16 | # 17 | attr_accessor :tabs 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'tabs' => :'tabs' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'tabs' => :'Array' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'tabs') 42 | if (value = attributes[:'tabs']).is_a?(Array) 43 | self.tabs = value 44 | end 45 | end 46 | end 47 | 48 | # Show invalid properties with the reasons. Usually used together with valid? 49 | # @return Array for valid properties with the reasons 50 | def list_invalid_properties 51 | invalid_properties = Array.new 52 | invalid_properties 53 | end 54 | 55 | # Check to see if the all the properties in the model are valid 56 | # @return true if the model is valid 57 | def valid? 58 | true 59 | end 60 | 61 | # Checks equality by comparing each attribute. 62 | # @param [Object] Object to be compared 63 | def ==(o) 64 | return true if self.equal?(o) 65 | self.class == o.class && 66 | tabs == o.tabs 67 | end 68 | 69 | # @see the `==` method 70 | # @param [Object] Object to be compared 71 | def eql?(o) 72 | self == o 73 | end 74 | 75 | # Calculates hash code according to all attributes. 76 | # @return [Fixnum] Hash code 77 | def hash 78 | [tabs].hash 79 | end 80 | 81 | # Builds the object from hash 82 | # @param [Hash] attributes Model attributes in the form of hash 83 | # @return [Object] Returns the model itself 84 | def build_from_hash(attributes) 85 | return nil unless attributes.is_a?(Hash) 86 | self.class.swagger_types.each_pair do |key, type| 87 | if type =~ /\AArray<(.*)>/i 88 | # check to ensure the input is an array given that the attribute 89 | # is documented as an array but the input is not 90 | if attributes[self.class.attribute_map[key]].is_a?(Array) 91 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 92 | end 93 | elsif !attributes[self.class.attribute_map[key]].nil? 94 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 95 | end # or else data not found in attributes(hash), not an issue as the data can be optional 96 | end 97 | 98 | self 99 | end 100 | 101 | # Deserializes the data based on type 102 | # @param string type Data type 103 | # @param string value Value to be deserialized 104 | # @return [Object] Deserialized data 105 | def _deserialize(type, value) 106 | case type.to_sym 107 | when :DateTime 108 | DateTime.parse(value) 109 | when :Date 110 | Date.parse(value) 111 | when :String 112 | value.to_s 113 | when :Integer 114 | value.to_i 115 | when :Float 116 | value.to_f 117 | when :BOOLEAN 118 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 119 | true 120 | else 121 | false 122 | end 123 | when :Object 124 | # generic object (usually a Hash), return directly 125 | value 126 | when /\AArray<(?.+)>\z/ 127 | inner_type = Regexp.last_match[:inner_type] 128 | value.map { |v| _deserialize(inner_type, v) } 129 | when /\AHash<(?.+?), (?.+)>\z/ 130 | k_type = Regexp.last_match[:k_type] 131 | v_type = Regexp.last_match[:v_type] 132 | {}.tap do |hash| 133 | value.each do |k, v| 134 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 135 | end 136 | end 137 | else # model 138 | temp_model = DocuSign_eSign.const_get(type).new 139 | temp_model.build_from_hash(value) 140 | end 141 | end 142 | 143 | # Returns the string representation of the object 144 | # @return [String] String presentation of the object 145 | def to_s 146 | to_hash.to_s 147 | end 148 | 149 | # to_body is an alias to to_hash (backward compatibility) 150 | # @return [Hash] Returns the object in the form of hash 151 | def to_body 152 | to_hash 153 | end 154 | 155 | # Returns the object in the form of hash 156 | # @return [Hash] Returns the object in the form of hash 157 | def to_hash 158 | hash = {} 159 | self.class.attribute_map.each_pair do |attr, param| 160 | value = self.send(attr) 161 | next if value.nil? 162 | hash[param] = _to_hash(value) 163 | end 164 | hash 165 | end 166 | 167 | # Outputs non-array value in the form of hash 168 | # For object, use to_hash. Otherwise, just return the value 169 | # @param [Object] value Any valid value 170 | # @return [Hash] Returns the value in the form of hash 171 | def _to_hash(value) 172 | if value.is_a?(Array) 173 | value.compact.map { |v| _to_hash(v) } 174 | elsif value.is_a?(Hash) 175 | {}.tap do |hash| 176 | value.each { |k, v| hash[k] = _to_hash(v) } 177 | end 178 | elsif value.respond_to? :to_hash 179 | value.to_hash 180 | else 181 | value 182 | end 183 | end 184 | 185 | end 186 | end 187 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/template_auto_match_list.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class TemplateAutoMatchList 16 | # 17 | attr_accessor :templates 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'templates' => :'templates' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'templates' => :'Array' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'templates') 42 | if (value = attributes[:'templates']).is_a?(Array) 43 | self.templates = value 44 | end 45 | end 46 | end 47 | 48 | # Show invalid properties with the reasons. Usually used together with valid? 49 | # @return Array for valid properties with the reasons 50 | def list_invalid_properties 51 | invalid_properties = Array.new 52 | invalid_properties 53 | end 54 | 55 | # Check to see if the all the properties in the model are valid 56 | # @return true if the model is valid 57 | def valid? 58 | true 59 | end 60 | 61 | # Checks equality by comparing each attribute. 62 | # @param [Object] Object to be compared 63 | def ==(o) 64 | return true if self.equal?(o) 65 | self.class == o.class && 66 | templates == o.templates 67 | end 68 | 69 | # @see the `==` method 70 | # @param [Object] Object to be compared 71 | def eql?(o) 72 | self == o 73 | end 74 | 75 | # Calculates hash code according to all attributes. 76 | # @return [Fixnum] Hash code 77 | def hash 78 | [templates].hash 79 | end 80 | 81 | # Builds the object from hash 82 | # @param [Hash] attributes Model attributes in the form of hash 83 | # @return [Object] Returns the model itself 84 | def build_from_hash(attributes) 85 | return nil unless attributes.is_a?(Hash) 86 | self.class.swagger_types.each_pair do |key, type| 87 | if type =~ /\AArray<(.*)>/i 88 | # check to ensure the input is an array given that the attribute 89 | # is documented as an array but the input is not 90 | if attributes[self.class.attribute_map[key]].is_a?(Array) 91 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 92 | end 93 | elsif !attributes[self.class.attribute_map[key]].nil? 94 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 95 | end # or else data not found in attributes(hash), not an issue as the data can be optional 96 | end 97 | 98 | self 99 | end 100 | 101 | # Deserializes the data based on type 102 | # @param string type Data type 103 | # @param string value Value to be deserialized 104 | # @return [Object] Deserialized data 105 | def _deserialize(type, value) 106 | case type.to_sym 107 | when :DateTime 108 | DateTime.parse(value) 109 | when :Date 110 | Date.parse(value) 111 | when :String 112 | value.to_s 113 | when :Integer 114 | value.to_i 115 | when :Float 116 | value.to_f 117 | when :BOOLEAN 118 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 119 | true 120 | else 121 | false 122 | end 123 | when :Object 124 | # generic object (usually a Hash), return directly 125 | value 126 | when /\AArray<(?.+)>\z/ 127 | inner_type = Regexp.last_match[:inner_type] 128 | value.map { |v| _deserialize(inner_type, v) } 129 | when /\AHash<(?.+?), (?.+)>\z/ 130 | k_type = Regexp.last_match[:k_type] 131 | v_type = Regexp.last_match[:v_type] 132 | {}.tap do |hash| 133 | value.each do |k, v| 134 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 135 | end 136 | end 137 | else # model 138 | temp_model = DocuSign_eSign.const_get(type).new 139 | temp_model.build_from_hash(value) 140 | end 141 | end 142 | 143 | # Returns the string representation of the object 144 | # @return [String] String presentation of the object 145 | def to_s 146 | to_hash.to_s 147 | end 148 | 149 | # to_body is an alias to to_hash (backward compatibility) 150 | # @return [Hash] Returns the object in the form of hash 151 | def to_body 152 | to_hash 153 | end 154 | 155 | # Returns the object in the form of hash 156 | # @return [Hash] Returns the object in the form of hash 157 | def to_hash 158 | hash = {} 159 | self.class.attribute_map.each_pair do |attr, param| 160 | value = self.send(attr) 161 | next if value.nil? 162 | hash[param] = _to_hash(value) 163 | end 164 | hash 165 | end 166 | 167 | # Outputs non-array value in the form of hash 168 | # For object, use to_hash. Otherwise, just return the value 169 | # @param [Object] value Any valid value 170 | # @return [Hash] Returns the value in the form of hash 171 | def _to_hash(value) 172 | if value.is_a?(Array) 173 | value.compact.map { |v| _to_hash(v) } 174 | elsif value.is_a?(Hash) 175 | {}.tap do |hash| 176 | value.each { |k, v| hash[k] = _to_hash(v) } 177 | end 178 | elsif value.respond_to? :to_hash 179 | value.to_hash 180 | else 181 | value 182 | end 183 | end 184 | 185 | end 186 | end 187 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/template_information.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class TemplateInformation 16 | # 17 | attr_accessor :templates 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'templates' => :'templates' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'templates' => :'Array' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'templates') 42 | if (value = attributes[:'templates']).is_a?(Array) 43 | self.templates = value 44 | end 45 | end 46 | end 47 | 48 | # Show invalid properties with the reasons. Usually used together with valid? 49 | # @return Array for valid properties with the reasons 50 | def list_invalid_properties 51 | invalid_properties = Array.new 52 | invalid_properties 53 | end 54 | 55 | # Check to see if the all the properties in the model are valid 56 | # @return true if the model is valid 57 | def valid? 58 | true 59 | end 60 | 61 | # Checks equality by comparing each attribute. 62 | # @param [Object] Object to be compared 63 | def ==(o) 64 | return true if self.equal?(o) 65 | self.class == o.class && 66 | templates == o.templates 67 | end 68 | 69 | # @see the `==` method 70 | # @param [Object] Object to be compared 71 | def eql?(o) 72 | self == o 73 | end 74 | 75 | # Calculates hash code according to all attributes. 76 | # @return [Fixnum] Hash code 77 | def hash 78 | [templates].hash 79 | end 80 | 81 | # Builds the object from hash 82 | # @param [Hash] attributes Model attributes in the form of hash 83 | # @return [Object] Returns the model itself 84 | def build_from_hash(attributes) 85 | return nil unless attributes.is_a?(Hash) 86 | self.class.swagger_types.each_pair do |key, type| 87 | if type =~ /\AArray<(.*)>/i 88 | # check to ensure the input is an array given that the attribute 89 | # is documented as an array but the input is not 90 | if attributes[self.class.attribute_map[key]].is_a?(Array) 91 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 92 | end 93 | elsif !attributes[self.class.attribute_map[key]].nil? 94 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 95 | end # or else data not found in attributes(hash), not an issue as the data can be optional 96 | end 97 | 98 | self 99 | end 100 | 101 | # Deserializes the data based on type 102 | # @param string type Data type 103 | # @param string value Value to be deserialized 104 | # @return [Object] Deserialized data 105 | def _deserialize(type, value) 106 | case type.to_sym 107 | when :DateTime 108 | DateTime.parse(value) 109 | when :Date 110 | Date.parse(value) 111 | when :String 112 | value.to_s 113 | when :Integer 114 | value.to_i 115 | when :Float 116 | value.to_f 117 | when :BOOLEAN 118 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 119 | true 120 | else 121 | false 122 | end 123 | when :Object 124 | # generic object (usually a Hash), return directly 125 | value 126 | when /\AArray<(?.+)>\z/ 127 | inner_type = Regexp.last_match[:inner_type] 128 | value.map { |v| _deserialize(inner_type, v) } 129 | when /\AHash<(?.+?), (?.+)>\z/ 130 | k_type = Regexp.last_match[:k_type] 131 | v_type = Regexp.last_match[:v_type] 132 | {}.tap do |hash| 133 | value.each do |k, v| 134 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 135 | end 136 | end 137 | else # model 138 | temp_model = DocuSign_eSign.const_get(type).new 139 | temp_model.build_from_hash(value) 140 | end 141 | end 142 | 143 | # Returns the string representation of the object 144 | # @return [String] String presentation of the object 145 | def to_s 146 | to_hash.to_s 147 | end 148 | 149 | # to_body is an alias to to_hash (backward compatibility) 150 | # @return [Hash] Returns the object in the form of hash 151 | def to_body 152 | to_hash 153 | end 154 | 155 | # Returns the object in the form of hash 156 | # @return [Hash] Returns the object in the form of hash 157 | def to_hash 158 | hash = {} 159 | self.class.attribute_map.each_pair do |attr, param| 160 | value = self.send(attr) 161 | next if value.nil? 162 | hash[param] = _to_hash(value) 163 | end 164 | hash 165 | end 166 | 167 | # Outputs non-array value in the form of hash 168 | # For object, use to_hash. Otherwise, just return the value 169 | # @param [Object] value Any valid value 170 | # @return [Hash] Returns the value in the form of hash 171 | def _to_hash(value) 172 | if value.is_a?(Array) 173 | value.compact.map { |v| _to_hash(v) } 174 | elsif value.is_a?(Hash) 175 | {}.tap do |hash| 176 | value.each { |k, v| hash[k] = _to_hash(v) } 177 | end 178 | elsif value.respond_to? :to_hash 179 | value.to_hash 180 | else 181 | value 182 | end 183 | end 184 | 185 | end 186 | end 187 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/update_transaction_response.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #DocuSign REST API 3 | 4 | #The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class UpdateTransactionResponse 16 | # 17 | attr_accessor :redirection_url 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'redirection_url' => :'redirectionUrl' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'redirection_url' => :'String' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'redirectionUrl') 42 | self.redirection_url = attributes[:'redirectionUrl'] 43 | end 44 | end 45 | 46 | # Show invalid properties with the reasons. Usually used together with valid? 47 | # @return Array for valid properties with the reasons 48 | def list_invalid_properties 49 | invalid_properties = Array.new 50 | invalid_properties 51 | end 52 | 53 | # Check to see if the all the properties in the model are valid 54 | # @return true if the model is valid 55 | def valid? 56 | true 57 | end 58 | 59 | # Checks equality by comparing each attribute. 60 | # @param [Object] Object to be compared 61 | def ==(o) 62 | return true if self.equal?(o) 63 | self.class == o.class && 64 | redirection_url == o.redirection_url 65 | end 66 | 67 | # @see the `==` method 68 | # @param [Object] Object to be compared 69 | def eql?(o) 70 | self == o 71 | end 72 | 73 | # Calculates hash code according to all attributes. 74 | # @return [Fixnum] Hash code 75 | def hash 76 | [redirection_url].hash 77 | end 78 | 79 | # Builds the object from hash 80 | # @param [Hash] attributes Model attributes in the form of hash 81 | # @return [Object] Returns the model itself 82 | def build_from_hash(attributes) 83 | return nil unless attributes.is_a?(Hash) 84 | self.class.swagger_types.each_pair do |key, type| 85 | if type =~ /\AArray<(.*)>/i 86 | # check to ensure the input is an array given that the attribute 87 | # is documented as an array but the input is not 88 | if attributes[self.class.attribute_map[key]].is_a?(Array) 89 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 90 | end 91 | elsif !attributes[self.class.attribute_map[key]].nil? 92 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 93 | end # or else data not found in attributes(hash), not an issue as the data can be optional 94 | end 95 | 96 | self 97 | end 98 | 99 | # Deserializes the data based on type 100 | # @param string type Data type 101 | # @param string value Value to be deserialized 102 | # @return [Object] Deserialized data 103 | def _deserialize(type, value) 104 | case type.to_sym 105 | when :DateTime 106 | DateTime.parse(value) 107 | when :Date 108 | Date.parse(value) 109 | when :String 110 | value.to_s 111 | when :Integer 112 | value.to_i 113 | when :Float 114 | value.to_f 115 | when :BOOLEAN 116 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 117 | true 118 | else 119 | false 120 | end 121 | when :Object 122 | # generic object (usually a Hash), return directly 123 | value 124 | when /\AArray<(?.+)>\z/ 125 | inner_type = Regexp.last_match[:inner_type] 126 | value.map { |v| _deserialize(inner_type, v) } 127 | when /\AHash<(?.+?), (?.+)>\z/ 128 | k_type = Regexp.last_match[:k_type] 129 | v_type = Regexp.last_match[:v_type] 130 | {}.tap do |hash| 131 | value.each do |k, v| 132 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 133 | end 134 | end 135 | else # model 136 | temp_model = DocuSign_eSign.const_get(type).new 137 | temp_model.build_from_hash(value) 138 | end 139 | end 140 | 141 | # Returns the string representation of the object 142 | # @return [String] String presentation of the object 143 | def to_s 144 | to_hash.to_s 145 | end 146 | 147 | # to_body is an alias to to_hash (backward compatibility) 148 | # @return [Hash] Returns the object in the form of hash 149 | def to_body 150 | to_hash 151 | end 152 | 153 | # Returns the object in the form of hash 154 | # @return [Hash] Returns the object in the form of hash 155 | def to_hash 156 | hash = {} 157 | self.class.attribute_map.each_pair do |attr, param| 158 | value = self.send(attr) 159 | next if value.nil? 160 | hash[param] = _to_hash(value) 161 | end 162 | hash 163 | end 164 | 165 | # Outputs non-array value in the form of hash 166 | # For object, use to_hash. Otherwise, just return the value 167 | # @param [Object] value Any valid value 168 | # @return [Hash] Returns the value in the form of hash 169 | def _to_hash(value) 170 | if value.is_a?(Array) 171 | value.compact.map { |v| _to_hash(v) } 172 | elsif value.is_a?(Hash) 173 | {}.tap do |hash| 174 | value.each { |k, v| hash[k] = _to_hash(v) } 175 | end 176 | elsif value.respond_to? :to_hash 177 | value.to_hash 178 | else 179 | value 180 | end 181 | end 182 | 183 | end 184 | end 185 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/user_authorizations_response.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class UserAuthorizationsResponse 16 | # 17 | attr_accessor :results 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'results' => :'results' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'results' => :'Array' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'results') 42 | if (value = attributes[:'results']).is_a?(Array) 43 | self.results = value 44 | end 45 | end 46 | end 47 | 48 | # Show invalid properties with the reasons. Usually used together with valid? 49 | # @return Array for valid properties with the reasons 50 | def list_invalid_properties 51 | invalid_properties = Array.new 52 | invalid_properties 53 | end 54 | 55 | # Check to see if the all the properties in the model are valid 56 | # @return true if the model is valid 57 | def valid? 58 | true 59 | end 60 | 61 | # Checks equality by comparing each attribute. 62 | # @param [Object] Object to be compared 63 | def ==(o) 64 | return true if self.equal?(o) 65 | self.class == o.class && 66 | results == o.results 67 | end 68 | 69 | # @see the `==` method 70 | # @param [Object] Object to be compared 71 | def eql?(o) 72 | self == o 73 | end 74 | 75 | # Calculates hash code according to all attributes. 76 | # @return [Fixnum] Hash code 77 | def hash 78 | [results].hash 79 | end 80 | 81 | # Builds the object from hash 82 | # @param [Hash] attributes Model attributes in the form of hash 83 | # @return [Object] Returns the model itself 84 | def build_from_hash(attributes) 85 | return nil unless attributes.is_a?(Hash) 86 | self.class.swagger_types.each_pair do |key, type| 87 | if type =~ /\AArray<(.*)>/i 88 | # check to ensure the input is an array given that the attribute 89 | # is documented as an array but the input is not 90 | if attributes[self.class.attribute_map[key]].is_a?(Array) 91 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 92 | end 93 | elsif !attributes[self.class.attribute_map[key]].nil? 94 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 95 | end # or else data not found in attributes(hash), not an issue as the data can be optional 96 | end 97 | 98 | self 99 | end 100 | 101 | # Deserializes the data based on type 102 | # @param string type Data type 103 | # @param string value Value to be deserialized 104 | # @return [Object] Deserialized data 105 | def _deserialize(type, value) 106 | case type.to_sym 107 | when :DateTime 108 | DateTime.parse(value) 109 | when :Date 110 | Date.parse(value) 111 | when :String 112 | value.to_s 113 | when :Integer 114 | value.to_i 115 | when :Float 116 | value.to_f 117 | when :BOOLEAN 118 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 119 | true 120 | else 121 | false 122 | end 123 | when :Object 124 | # generic object (usually a Hash), return directly 125 | value 126 | when /\AArray<(?.+)>\z/ 127 | inner_type = Regexp.last_match[:inner_type] 128 | value.map { |v| _deserialize(inner_type, v) } 129 | when /\AHash<(?.+?), (?.+)>\z/ 130 | k_type = Regexp.last_match[:k_type] 131 | v_type = Regexp.last_match[:v_type] 132 | {}.tap do |hash| 133 | value.each do |k, v| 134 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 135 | end 136 | end 137 | else # model 138 | temp_model = DocuSign_eSign.const_get(type).new 139 | temp_model.build_from_hash(value) 140 | end 141 | end 142 | 143 | # Returns the string representation of the object 144 | # @return [String] String presentation of the object 145 | def to_s 146 | to_hash.to_s 147 | end 148 | 149 | # to_body is an alias to to_hash (backward compatibility) 150 | # @return [Hash] Returns the object in the form of hash 151 | def to_body 152 | to_hash 153 | end 154 | 155 | # Returns the object in the form of hash 156 | # @return [Hash] Returns the object in the form of hash 157 | def to_hash 158 | hash = {} 159 | self.class.attribute_map.each_pair do |attr, param| 160 | value = self.send(attr) 161 | next if value.nil? 162 | hash[param] = _to_hash(value) 163 | end 164 | hash 165 | end 166 | 167 | # Outputs non-array value in the form of hash 168 | # For object, use to_hash. Otherwise, just return the value 169 | # @param [Object] value Any valid value 170 | # @return [Hash] Returns the value in the form of hash 171 | def _to_hash(value) 172 | if value.is_a?(Array) 173 | value.compact.map { |v| _to_hash(v) } 174 | elsif value.is_a?(Hash) 175 | {}.tap do |hash| 176 | value.each { |k, v| hash[k] = _to_hash(v) } 177 | end 178 | elsif value.respond_to? :to_hash 179 | value.to_hash 180 | else 181 | value 182 | end 183 | end 184 | 185 | end 186 | end 187 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/user_info_list.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class UserInfoList 16 | # 17 | attr_accessor :users 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'users' => :'users' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'users' => :'Array' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'users') 42 | if (value = attributes[:'users']).is_a?(Array) 43 | self.users = value 44 | end 45 | end 46 | end 47 | 48 | # Show invalid properties with the reasons. Usually used together with valid? 49 | # @return Array for valid properties with the reasons 50 | def list_invalid_properties 51 | invalid_properties = Array.new 52 | invalid_properties 53 | end 54 | 55 | # Check to see if the all the properties in the model are valid 56 | # @return true if the model is valid 57 | def valid? 58 | true 59 | end 60 | 61 | # Checks equality by comparing each attribute. 62 | # @param [Object] Object to be compared 63 | def ==(o) 64 | return true if self.equal?(o) 65 | self.class == o.class && 66 | users == o.users 67 | end 68 | 69 | # @see the `==` method 70 | # @param [Object] Object to be compared 71 | def eql?(o) 72 | self == o 73 | end 74 | 75 | # Calculates hash code according to all attributes. 76 | # @return [Fixnum] Hash code 77 | def hash 78 | [users].hash 79 | end 80 | 81 | # Builds the object from hash 82 | # @param [Hash] attributes Model attributes in the form of hash 83 | # @return [Object] Returns the model itself 84 | def build_from_hash(attributes) 85 | return nil unless attributes.is_a?(Hash) 86 | self.class.swagger_types.each_pair do |key, type| 87 | if type =~ /\AArray<(.*)>/i 88 | # check to ensure the input is an array given that the attribute 89 | # is documented as an array but the input is not 90 | if attributes[self.class.attribute_map[key]].is_a?(Array) 91 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 92 | end 93 | elsif !attributes[self.class.attribute_map[key]].nil? 94 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 95 | end # or else data not found in attributes(hash), not an issue as the data can be optional 96 | end 97 | 98 | self 99 | end 100 | 101 | # Deserializes the data based on type 102 | # @param string type Data type 103 | # @param string value Value to be deserialized 104 | # @return [Object] Deserialized data 105 | def _deserialize(type, value) 106 | case type.to_sym 107 | when :DateTime 108 | DateTime.parse(value) 109 | when :Date 110 | Date.parse(value) 111 | when :String 112 | value.to_s 113 | when :Integer 114 | value.to_i 115 | when :Float 116 | value.to_f 117 | when :BOOLEAN 118 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 119 | true 120 | else 121 | false 122 | end 123 | when :Object 124 | # generic object (usually a Hash), return directly 125 | value 126 | when /\AArray<(?.+)>\z/ 127 | inner_type = Regexp.last_match[:inner_type] 128 | value.map { |v| _deserialize(inner_type, v) } 129 | when /\AHash<(?.+?), (?.+)>\z/ 130 | k_type = Regexp.last_match[:k_type] 131 | v_type = Regexp.last_match[:v_type] 132 | {}.tap do |hash| 133 | value.each do |k, v| 134 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 135 | end 136 | end 137 | else # model 138 | temp_model = DocuSign_eSign.const_get(type).new 139 | temp_model.build_from_hash(value) 140 | end 141 | end 142 | 143 | # Returns the string representation of the object 144 | # @return [String] String presentation of the object 145 | def to_s 146 | to_hash.to_s 147 | end 148 | 149 | # to_body is an alias to to_hash (backward compatibility) 150 | # @return [Hash] Returns the object in the form of hash 151 | def to_body 152 | to_hash 153 | end 154 | 155 | # Returns the object in the form of hash 156 | # @return [Hash] Returns the object in the form of hash 157 | def to_hash 158 | hash = {} 159 | self.class.attribute_map.each_pair do |attr, param| 160 | value = self.send(attr) 161 | next if value.nil? 162 | hash[param] = _to_hash(value) 163 | end 164 | hash 165 | end 166 | 167 | # Outputs non-array value in the form of hash 168 | # For object, use to_hash. Otherwise, just return the value 169 | # @param [Object] value Any valid value 170 | # @return [Hash] Returns the value in the form of hash 171 | def _to_hash(value) 172 | if value.is_a?(Array) 173 | value.compact.map { |v| _to_hash(v) } 174 | elsif value.is_a?(Hash) 175 | {}.tap do |hash| 176 | value.each { |k, v| hash[k] = _to_hash(v) } 177 | end 178 | elsif value.respond_to? :to_hash 179 | value.to_hash 180 | else 181 | value 182 | end 183 | end 184 | 185 | end 186 | end 187 | -------------------------------------------------------------------------------- /lib/docusign_esign/models/view_url.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 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_eSign 15 | class ViewUrl 16 | # The view URL to be navigated to. 17 | attr_accessor :url 18 | 19 | # Attribute mapping from ruby-style variable name to JSON key. 20 | def self.attribute_map 21 | { 22 | :'url' => :'url' 23 | } 24 | end 25 | 26 | # Attribute type mapping. 27 | def self.swagger_types 28 | { 29 | :'url' => :'String' 30 | } 31 | end 32 | 33 | # Initializes the object 34 | # @param [Hash] attributes Model attributes in the form of hash 35 | def initialize(attributes = {}) 36 | return unless attributes.is_a?(Hash) 37 | 38 | # convert string to symbol for hash key 39 | attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 40 | 41 | if attributes.has_key?(:'url') 42 | self.url = attributes[:'url'] 43 | end 44 | end 45 | 46 | # Show invalid properties with the reasons. Usually used together with valid? 47 | # @return Array for valid properties with the reasons 48 | def list_invalid_properties 49 | invalid_properties = Array.new 50 | invalid_properties 51 | end 52 | 53 | # Check to see if the all the properties in the model are valid 54 | # @return true if the model is valid 55 | def valid? 56 | true 57 | end 58 | 59 | # Checks equality by comparing each attribute. 60 | # @param [Object] Object to be compared 61 | def ==(o) 62 | return true if self.equal?(o) 63 | self.class == o.class && 64 | url == o.url 65 | end 66 | 67 | # @see the `==` method 68 | # @param [Object] Object to be compared 69 | def eql?(o) 70 | self == o 71 | end 72 | 73 | # Calculates hash code according to all attributes. 74 | # @return [Fixnum] Hash code 75 | def hash 76 | [url].hash 77 | end 78 | 79 | # Builds the object from hash 80 | # @param [Hash] attributes Model attributes in the form of hash 81 | # @return [Object] Returns the model itself 82 | def build_from_hash(attributes) 83 | return nil unless attributes.is_a?(Hash) 84 | self.class.swagger_types.each_pair do |key, type| 85 | if type =~ /\AArray<(.*)>/i 86 | # check to ensure the input is an array given that the attribute 87 | # is documented as an array but the input is not 88 | if attributes[self.class.attribute_map[key]].is_a?(Array) 89 | self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) 90 | end 91 | elsif !attributes[self.class.attribute_map[key]].nil? 92 | self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) 93 | end # or else data not found in attributes(hash), not an issue as the data can be optional 94 | end 95 | 96 | self 97 | end 98 | 99 | # Deserializes the data based on type 100 | # @param string type Data type 101 | # @param string value Value to be deserialized 102 | # @return [Object] Deserialized data 103 | def _deserialize(type, value) 104 | case type.to_sym 105 | when :DateTime 106 | DateTime.parse(value) 107 | when :Date 108 | Date.parse(value) 109 | when :String 110 | value.to_s 111 | when :Integer 112 | value.to_i 113 | when :Float 114 | value.to_f 115 | when :BOOLEAN 116 | if value.to_s =~ /\A(true|t|yes|y|1)\z/i 117 | true 118 | else 119 | false 120 | end 121 | when :Object 122 | # generic object (usually a Hash), return directly 123 | value 124 | when /\AArray<(?.+)>\z/ 125 | inner_type = Regexp.last_match[:inner_type] 126 | value.map { |v| _deserialize(inner_type, v) } 127 | when /\AHash<(?.+?), (?.+)>\z/ 128 | k_type = Regexp.last_match[:k_type] 129 | v_type = Regexp.last_match[:v_type] 130 | {}.tap do |hash| 131 | value.each do |k, v| 132 | hash[_deserialize(k_type, k)] = _deserialize(v_type, v) 133 | end 134 | end 135 | else # model 136 | temp_model = DocuSign_eSign.const_get(type).new 137 | temp_model.build_from_hash(value) 138 | end 139 | end 140 | 141 | # Returns the string representation of the object 142 | # @return [String] String presentation of the object 143 | def to_s 144 | to_hash.to_s 145 | end 146 | 147 | # to_body is an alias to to_hash (backward compatibility) 148 | # @return [Hash] Returns the object in the form of hash 149 | def to_body 150 | to_hash 151 | end 152 | 153 | # Returns the object in the form of hash 154 | # @return [Hash] Returns the object in the form of hash 155 | def to_hash 156 | hash = {} 157 | self.class.attribute_map.each_pair do |attr, param| 158 | value = self.send(attr) 159 | next if value.nil? 160 | hash[param] = _to_hash(value) 161 | end 162 | hash 163 | end 164 | 165 | # Outputs non-array value in the form of hash 166 | # For object, use to_hash. Otherwise, just return the value 167 | # @param [Object] value Any valid value 168 | # @return [Hash] Returns the value in the form of hash 169 | def _to_hash(value) 170 | if value.is_a?(Array) 171 | value.compact.map { |v| _to_hash(v) } 172 | elsif value.is_a?(Hash) 173 | {}.tap do |hash| 174 | value.each { |k, v| hash[k] = _to_hash(v) } 175 | end 176 | elsif value.respond_to? :to_hash 177 | value.to_hash 178 | else 179 | value 180 | end 181 | end 182 | 183 | end 184 | end 185 | -------------------------------------------------------------------------------- /lib/docusign_esign/version.rb: -------------------------------------------------------------------------------- 1 | =begin 2 | #Docusign eSignature REST API 3 | 4 | #The Docusign eSignature REST API provides you with a powerful, convenient, and simple Web services API for interacting with Docusign. 5 | 6 | OpenAPI spec version: v2.1 7 | Contact: devcenter@docusign.com 8 | Generated by: https://github.com/swagger-api/swagger-codegen.git 9 | 10 | =end 11 | 12 | module DocuSign_eSign 13 | VERSION = '5.2.0' 14 | end 15 | -------------------------------------------------------------------------------- /runLinter.sh: -------------------------------------------------------------------------------- 1 | ./vendor/bundle/ruby/2.6.0/bin/rubocop -a -------------------------------------------------------------------------------- /tests/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'rspec' 4 | 5 | gem 'ffi', '1.16.3' 6 | gem 'docusign_esign', path: '../' 7 | -------------------------------------------------------------------------------- /tests/docs/Test.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/docusign/docusign-esign-ruby-client/c1adb79a283bc38a54a392d3f4bad4034fb3b75b/tests/docs/Test.pdf --------------------------------------------------------------------------------