yousign_client 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +230 -0
- data/Rakefile +8 -0
- data/config.json +11 -0
- data/docs/AuthenticationEmailOutput.md +10 -0
- data/docs/AuthenticationInweboOutput.md +10 -0
- data/docs/AuthenticationSmsOutput.md +10 -0
- data/docs/AuthenticationsApi.md +320 -0
- data/docs/Body.md +8 -0
- data/docs/Body1.md +9 -0
- data/docs/Body2.md +9 -0
- data/docs/CheckDocumentBankAccountsInput.md +13 -0
- data/docs/CheckDocumentBankAccountsOutput.md +24 -0
- data/docs/CheckDocumentIdentitiesInput.md +11 -0
- data/docs/CheckDocumentIdentitiesOutput.md +28 -0
- data/docs/CheckDocumentsApi.md +210 -0
- data/docs/ConfigEmailTemplate.md +11 -0
- data/docs/ConfigWebhookTemplate.md +10 -0
- data/docs/ConsentProcessInput.md +14 -0
- data/docs/ConsentProcessOutput.md +15 -0
- data/docs/ConsentProcessValueInput.md +10 -0
- data/docs/ConsentProcessValueOutput.md +12 -0
- data/docs/ConsentProcessesApi.md +422 -0
- data/docs/FileInput.md +15 -0
- data/docs/FileInputMetadata.md +9 -0
- data/docs/FileObjectInput.md +21 -0
- data/docs/FileObjectInputWithoutFileReference.md +13 -0
- data/docs/FileObjectOutput.md +24 -0
- data/docs/FileObjectOutputWithoutFileReference.md +17 -0
- data/docs/FileObjectsApi.md +220 -0
- data/docs/FileOutput.md +19 -0
- data/docs/FilesApi.md +218 -0
- data/docs/InlineResponse400.md +8 -0
- data/docs/InweboUserRequest.md +8 -0
- data/docs/MemberInput.md +19 -0
- data/docs/MemberOutput.md +24 -0
- data/docs/MembersApi.md +272 -0
- data/docs/ModeSmsConfiguration.md +8 -0
- data/docs/OperationInput.md +14 -0
- data/docs/OperationOutput.md +15 -0
- data/docs/OperationOutputMetadata.md +9 -0
- data/docs/OperationsApi.md +109 -0
- data/docs/OrganizationBillingAddress.md +16 -0
- data/docs/OrganizationOutput.md +41 -0
- data/docs/OrganizationsApi.md +54 -0
- data/docs/ProcedureConfig.md +10 -0
- data/docs/ProcedureConfigEmail.md +15 -0
- data/docs/ProcedureConfigReminder.md +10 -0
- data/docs/ProcedureConfigReminderConfig.md +8 -0
- data/docs/ProcedureConfigReminderConfigEmail.md +8 -0
- data/docs/ProcedureConfigWebhook.md +15 -0
- data/docs/ProcedureDuplicateInput.md +9 -0
- data/docs/ProcedureInput.md +18 -0
- data/docs/ProcedureInputMetadata.md +9 -0
- data/docs/ProcedureOutput.md +27 -0
- data/docs/ProcedureOutputMetadata.md +9 -0
- data/docs/ProcedureRemindConfig.md +8 -0
- data/docs/ProcedureRemindConfigEmail.md +8 -0
- data/docs/ProcedureRemindInput.md +8 -0
- data/docs/ProceduresApi.md +527 -0
- data/docs/ServerStampConfig.md +8 -0
- data/docs/ServerStampConfigWebhook.md +8 -0
- data/docs/ServerStampInput.md +12 -0
- data/docs/ServerStampOutput.md +17 -0
- data/docs/ServerStampsApi.md +109 -0
- data/docs/SignatureUIsApi.md +545 -0
- data/docs/SignatureUiInput.md +28 -0
- data/docs/SignatureUiInputRedirectCancel.md +10 -0
- data/docs/SignatureUiInputRedirectError.md +10 -0
- data/docs/SignatureUiInputRedirectSuccess.md +10 -0
- data/docs/SignatureUiInputUpdate.md +27 -0
- data/docs/SignatureUiLabelInput.md +10 -0
- data/docs/SignatureUiLabelInputIncluded.md +9 -0
- data/docs/SignatureUiLabelOutput.md +14 -0
- data/docs/SignatureUiOutput.md +33 -0
- data/docs/SignatureUiOutputRedirectCancel.md +10 -0
- data/docs/SignatureUiOutputRedirectError.md +10 -0
- data/docs/SignatureUiOutputRedirectSuccess.md +10 -0
- data/docs/UserGroup.md +10 -0
- data/docs/UserGroupsApi.md +103 -0
- data/docs/UserInput.md +17 -0
- data/docs/UserInputNotifications.md +8 -0
- data/docs/UserOutput.md +29 -0
- data/docs/UserOutputNotifications.md +8 -0
- data/docs/UserWorkspaceOutput.md +9 -0
- data/docs/UsersApi.md +258 -0
- data/docs/WorkspaceConfig.md +10 -0
- data/docs/WorkspaceConfigEmail.md +15 -0
- data/docs/WorkspaceConfigProcedure.md +8 -0
- data/docs/WorkspaceOutput.md +16 -0
- data/docs/WorkspacesApi.md +54 -0
- data/git_push.sh +55 -0
- data/lib/yousign_client.rb +126 -0
- data/lib/yousign_client/api/authentications_api.rb +410 -0
- data/lib/yousign_client/api/check_documents_api.rb +269 -0
- data/lib/yousign_client/api/consent_processes_api.rb +528 -0
- data/lib/yousign_client/api/file_objects_api.rb +282 -0
- data/lib/yousign_client/api/files_api.rb +279 -0
- data/lib/yousign_client/api/members_api.rb +340 -0
- data/lib/yousign_client/api/operations_api.rb +148 -0
- data/lib/yousign_client/api/organizations_api.rb +76 -0
- data/lib/yousign_client/api/procedures_api.rb +680 -0
- data/lib/yousign_client/api/server_stamps_api.rb +146 -0
- data/lib/yousign_client/api/signature_u_is_api.rb +669 -0
- data/lib/yousign_client/api/user_groups_api.rb +135 -0
- data/lib/yousign_client/api/users_api.rb +327 -0
- data/lib/yousign_client/api/workspaces_api.rb +76 -0
- data/lib/yousign_client/api_client.rb +391 -0
- data/lib/yousign_client/api_error.rb +38 -0
- data/lib/yousign_client/configuration.rb +209 -0
- data/lib/yousign_client/models/authentication_email_output.rb +239 -0
- data/lib/yousign_client/models/authentication_inwebo_output.rb +239 -0
- data/lib/yousign_client/models/authentication_sms_output.rb +239 -0
- data/lib/yousign_client/models/body.rb +185 -0
- data/lib/yousign_client/models/body_1.rb +200 -0
- data/lib/yousign_client/models/body_2.rb +200 -0
- data/lib/yousign_client/models/check_document_bank_accounts_input.rb +240 -0
- data/lib/yousign_client/models/check_document_bank_accounts_output.rb +394 -0
- data/lib/yousign_client/models/check_document_identities_input.rb +222 -0
- data/lib/yousign_client/models/check_document_identities_output.rb +440 -0
- data/lib/yousign_client/models/config_email_template.rb +256 -0
- data/lib/yousign_client/models/config_webhook_template.rb +246 -0
- data/lib/yousign_client/models/consent_process_input.rb +293 -0
- data/lib/yousign_client/models/consent_process_output.rb +298 -0
- data/lib/yousign_client/models/consent_process_value_input.rb +215 -0
- data/lib/yousign_client/models/consent_process_value_output.rb +235 -0
- data/lib/yousign_client/models/file_input.rb +304 -0
- data/lib/yousign_client/models/file_input_metadata.rb +194 -0
- data/lib/yousign_client/models/file_object_input.rb +445 -0
- data/lib/yousign_client/models/file_object_input_without_file_reference.rb +252 -0
- data/lib/yousign_client/models/file_object_output.rb +489 -0
- data/lib/yousign_client/models/file_object_output_without_file_reference.rb +307 -0
- data/lib/yousign_client/models/file_output.rb +374 -0
- data/lib/yousign_client/models/inline_response_400.rb +185 -0
- data/lib/yousign_client/models/inwebo_user_request.rb +200 -0
- data/lib/yousign_client/models/member_input.rb +343 -0
- data/lib/yousign_client/models/member_output.rb +432 -0
- data/lib/yousign_client/models/mode_sms_configuration.rb +190 -0
- data/lib/yousign_client/models/operation_input.rb +313 -0
- data/lib/yousign_client/models/operation_output.rb +311 -0
- data/lib/yousign_client/models/operation_output_metadata.rb +194 -0
- data/lib/yousign_client/models/organization_billing_address.rb +256 -0
- data/lib/yousign_client/models/organization_output.rb +530 -0
- data/lib/yousign_client/models/procedure_config.rb +204 -0
- data/lib/yousign_client/models/procedure_config_email.rb +263 -0
- data/lib/yousign_client/models/procedure_config_reminder.rb +256 -0
- data/lib/yousign_client/models/procedure_config_reminder_config.rb +184 -0
- data/lib/yousign_client/models/procedure_config_reminder_config_email.rb +186 -0
- data/lib/yousign_client/models/procedure_config_webhook.rb +263 -0
- data/lib/yousign_client/models/procedure_duplicate_input.rb +197 -0
- data/lib/yousign_client/models/procedure_input.rb +289 -0
- data/lib/yousign_client/models/procedure_input_metadata.rb +194 -0
- data/lib/yousign_client/models/procedure_output.rb +457 -0
- data/lib/yousign_client/models/procedure_output_metadata.rb +194 -0
- data/lib/yousign_client/models/procedure_remind_config.rb +184 -0
- data/lib/yousign_client/models/procedure_remind_config_email.rb +186 -0
- data/lib/yousign_client/models/procedure_remind_input.rb +184 -0
- data/lib/yousign_client/models/server_stamp_config.rb +184 -0
- data/lib/yousign_client/models/server_stamp_config_webhook.rb +186 -0
- data/lib/yousign_client/models/server_stamp_input.rb +242 -0
- data/lib/yousign_client/models/server_stamp_output.rb +352 -0
- data/lib/yousign_client/models/signature_ui_input.rb +456 -0
- data/lib/yousign_client/models/signature_ui_input_redirect_cancel.rb +244 -0
- data/lib/yousign_client/models/signature_ui_input_redirect_error.rb +247 -0
- data/lib/yousign_client/models/signature_ui_input_redirect_success.rb +242 -0
- data/lib/yousign_client/models/signature_ui_input_update.rb +421 -0
- data/lib/yousign_client/models/signature_ui_label_input.rb +210 -0
- data/lib/yousign_client/models/signature_ui_label_input_included.rb +200 -0
- data/lib/yousign_client/models/signature_ui_label_output.rb +245 -0
- data/lib/yousign_client/models/signature_ui_output.rb +481 -0
- data/lib/yousign_client/models/signature_ui_output_redirect_cancel.rb +242 -0
- data/lib/yousign_client/models/signature_ui_output_redirect_error.rb +247 -0
- data/lib/yousign_client/models/signature_ui_output_redirect_success.rb +242 -0
- data/lib/yousign_client/models/user_group.rb +249 -0
- data/lib/yousign_client/models/user_input.rb +341 -0
- data/lib/yousign_client/models/user_input_notifications.rb +185 -0
- data/lib/yousign_client/models/user_output.rb +457 -0
- data/lib/yousign_client/models/user_output_notifications.rb +185 -0
- data/lib/yousign_client/models/user_workspace_output.rb +210 -0
- data/lib/yousign_client/models/workspace_config.rb +226 -0
- data/lib/yousign_client/models/workspace_config_email.rb +263 -0
- data/lib/yousign_client/models/workspace_config_procedure.rb +208 -0
- data/lib/yousign_client/models/workspace_output.rb +275 -0
- data/lib/yousign_client/version.rb +15 -0
- data/spec/api/authentications_api_spec.rb +113 -0
- data/spec/api/check_documents_api_spec.rb +85 -0
- data/spec/api/consent_processes_api_spec.rb +138 -0
- data/spec/api/file_objects_api_spec.rb +90 -0
- data/spec/api/files_api_spec.rb +89 -0
- data/spec/api/members_api_spec.rb +103 -0
- data/spec/api/operations_api_spec.rb +60 -0
- data/spec/api/organizations_api_spec.rb +46 -0
- data/spec/api/procedures_api_spec.rb +178 -0
- data/spec/api/server_stamps_api_spec.rb +60 -0
- data/spec/api/signature_u_is_api_spec.rb +170 -0
- data/spec/api/user_groups_api_spec.rb +58 -0
- data/spec/api/users_api_spec.rb +97 -0
- data/spec/api/workspaces_api_spec.rb +46 -0
- data/spec/api_client_spec.rb +243 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/authentication_email_output_spec.rb +57 -0
- data/spec/models/authentication_inwebo_output_spec.rb +57 -0
- data/spec/models/authentication_sms_output_spec.rb +57 -0
- data/spec/models/body_1_spec.rb +47 -0
- data/spec/models/body_2_spec.rb +47 -0
- data/spec/models/body_spec.rb +41 -0
- data/spec/models/check_document_bank_accounts_input_spec.rb +71 -0
- data/spec/models/check_document_bank_accounts_output_spec.rb +141 -0
- data/spec/models/check_document_identities_input_spec.rb +59 -0
- data/spec/models/check_document_identities_output_spec.rb +165 -0
- data/spec/models/config_email_template_spec.rb +63 -0
- data/spec/models/config_webhook_template_spec.rb +57 -0
- data/spec/models/consent_process_input_spec.rb +81 -0
- data/spec/models/consent_process_output_spec.rb +87 -0
- data/spec/models/consent_process_value_input_spec.rb +53 -0
- data/spec/models/consent_process_value_output_spec.rb +65 -0
- data/spec/models/file_input_metadata_spec.rb +47 -0
- data/spec/models/file_input_spec.rb +87 -0
- data/spec/models/file_object_input_spec.rb +127 -0
- data/spec/models/file_object_input_without_file_reference_spec.rb +71 -0
- data/spec/models/file_object_output_spec.rb +145 -0
- data/spec/models/file_object_output_without_file_reference_spec.rb +95 -0
- data/spec/models/file_output_spec.rb +111 -0
- data/spec/models/inline_response_400_spec.rb +41 -0
- data/spec/models/inwebo_user_request_spec.rb +41 -0
- data/spec/models/member_input_spec.rb +119 -0
- data/spec/models/member_output_spec.rb +153 -0
- data/spec/models/mode_sms_configuration_spec.rb +41 -0
- data/spec/models/operation_input_spec.rb +89 -0
- data/spec/models/operation_output_metadata_spec.rb +47 -0
- data/spec/models/operation_output_spec.rb +95 -0
- data/spec/models/organization_billing_address_spec.rb +89 -0
- data/spec/models/organization_output_spec.rb +239 -0
- data/spec/models/procedure_config_email_spec.rb +83 -0
- data/spec/models/procedure_config_reminder_config_email_spec.rb +41 -0
- data/spec/models/procedure_config_reminder_config_spec.rb +41 -0
- data/spec/models/procedure_config_reminder_spec.rb +53 -0
- data/spec/models/procedure_config_spec.rb +53 -0
- data/spec/models/procedure_config_webhook_spec.rb +83 -0
- data/spec/models/procedure_duplicate_input_spec.rb +47 -0
- data/spec/models/procedure_input_metadata_spec.rb +47 -0
- data/spec/models/procedure_input_spec.rb +101 -0
- data/spec/models/procedure_output_metadata_spec.rb +47 -0
- data/spec/models/procedure_output_spec.rb +159 -0
- data/spec/models/procedure_remind_config_email_spec.rb +41 -0
- data/spec/models/procedure_remind_config_spec.rb +41 -0
- data/spec/models/procedure_remind_input_spec.rb +41 -0
- data/spec/models/server_stamp_config_spec.rb +41 -0
- data/spec/models/server_stamp_config_webhook_spec.rb +41 -0
- data/spec/models/server_stamp_input_spec.rb +65 -0
- data/spec/models/server_stamp_output_spec.rb +99 -0
- data/spec/models/signature_ui_input_redirect_cancel_spec.rb +57 -0
- data/spec/models/signature_ui_input_redirect_error_spec.rb +57 -0
- data/spec/models/signature_ui_input_redirect_success_spec.rb +57 -0
- data/spec/models/signature_ui_input_spec.rb +165 -0
- data/spec/models/signature_ui_input_update_spec.rb +159 -0
- data/spec/models/signature_ui_label_input_included_spec.rb +47 -0
- data/spec/models/signature_ui_label_input_spec.rb +53 -0
- data/spec/models/signature_ui_label_output_spec.rb +77 -0
- data/spec/models/signature_ui_output_redirect_cancel_spec.rb +57 -0
- data/spec/models/signature_ui_output_redirect_error_spec.rb +57 -0
- data/spec/models/signature_ui_output_redirect_success_spec.rb +57 -0
- data/spec/models/signature_ui_output_spec.rb +195 -0
- data/spec/models/user_group_spec.rb +57 -0
- data/spec/models/user_input_notifications_spec.rb +41 -0
- data/spec/models/user_input_spec.rb +99 -0
- data/spec/models/user_output_notifications_spec.rb +41 -0
- data/spec/models/user_output_spec.rb +171 -0
- data/spec/models/user_workspace_output_spec.rb +47 -0
- data/spec/models/workspace_config_email_spec.rb +83 -0
- data/spec/models/workspace_config_procedure_spec.rb +45 -0
- data/spec/models/workspace_config_spec.rb +57 -0
- data/spec/models/workspace_output_spec.rb +89 -0
- data/spec/spec_helper.rb +111 -0
- data/update_client.sh +11 -0
- data/yousign_client.gemspec +45 -0
- data/yousign_openapi.json +5417 -0
- metadata +590 -0
@@ -0,0 +1,58 @@
|
|
1
|
+
=begin
|
2
|
+
#Yousign API Swagger
|
3
|
+
|
4
|
+
#For your information, the Yousign API documentation is available at https://dev.yousign.com/
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.1
|
7
|
+
Contact: support@yousign.fr
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for YousignClient::UserGroupsApi
|
17
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'UserGroupsApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@instance = YousignClient::UserGroupsApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of UserGroupsApi' do
|
30
|
+
it 'should create an instance of UserGroupsApi' do
|
31
|
+
expect(@instance).to be_instance_of(YousignClient::UserGroupsApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for user_groups_get
|
36
|
+
# Get User Group list
|
37
|
+
# @param authorization Authentication credentials for HTTP authentication
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @return [Array<UserGroup>]
|
40
|
+
describe 'user_groups_get test' do
|
41
|
+
it 'should work' do
|
42
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# unit tests for user_groups_id_get
|
47
|
+
# Find a User Group by ID
|
48
|
+
# @param id
|
49
|
+
# @param authorization Authentication credentials for HTTP authentication
|
50
|
+
# @param [Hash] opts the optional parameters
|
51
|
+
# @return [UserGroup]
|
52
|
+
describe 'user_groups_id_get test' do
|
53
|
+
it 'should work' do
|
54
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
@@ -0,0 +1,97 @@
|
|
1
|
+
=begin
|
2
|
+
#Yousign API Swagger
|
3
|
+
|
4
|
+
#For your information, the Yousign API documentation is available at https://dev.yousign.com/
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.1
|
7
|
+
Contact: support@yousign.fr
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for YousignClient::UsersApi
|
17
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'UsersApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@instance = YousignClient::UsersApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of UsersApi' do
|
30
|
+
it 'should create an instance of UsersApi' do
|
31
|
+
expect(@instance).to be_instance_of(YousignClient::UsersApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for users_get
|
36
|
+
# List all Users
|
37
|
+
# @param authorization Authentication credentials for HTTP authentication
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @return [Array<UserOutput>]
|
40
|
+
describe 'users_get test' do
|
41
|
+
it 'should work' do
|
42
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
# unit tests for users_id_delete
|
47
|
+
# Delete a User
|
48
|
+
# @param id
|
49
|
+
# @param authorization Authentication credentials for HTTP authentication
|
50
|
+
# @param [Hash] opts the optional parameters
|
51
|
+
# @return [nil]
|
52
|
+
describe 'users_id_delete test' do
|
53
|
+
it 'should work' do
|
54
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
# unit tests for users_id_get
|
59
|
+
# Find a User by ID
|
60
|
+
# @param id
|
61
|
+
# @param authorization Authentication credentials for HTTP authentication
|
62
|
+
# @param [Hash] opts the optional parameters
|
63
|
+
# @return [UserOutput]
|
64
|
+
describe 'users_id_get test' do
|
65
|
+
it 'should work' do
|
66
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# unit tests for users_id_put
|
71
|
+
# Update a User
|
72
|
+
# @param id
|
73
|
+
# @param authorization Authentication credentials for HTTP authentication
|
74
|
+
# @param content_type The MIME type of the body of the request
|
75
|
+
# @param body
|
76
|
+
# @param [Hash] opts the optional parameters
|
77
|
+
# @return [UserOutput]
|
78
|
+
describe 'users_id_put test' do
|
79
|
+
it 'should work' do
|
80
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
# unit tests for users_post
|
85
|
+
# Create a new User on Yousign application
|
86
|
+
# @param authorization Authentication credentials for HTTP authentication
|
87
|
+
# @param content_type The MIME type of the body of the request
|
88
|
+
# @param body
|
89
|
+
# @param [Hash] opts the optional parameters
|
90
|
+
# @return [UserOutput]
|
91
|
+
describe 'users_post test' do
|
92
|
+
it 'should work' do
|
93
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
=begin
|
2
|
+
#Yousign API Swagger
|
3
|
+
|
4
|
+
#For your information, the Yousign API documentation is available at https://dev.yousign.com/
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.1
|
7
|
+
Contact: support@yousign.fr
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for YousignClient::WorkspacesApi
|
17
|
+
# Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'WorkspacesApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@instance = YousignClient::WorkspacesApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of WorkspacesApi' do
|
30
|
+
it 'should create an instance of WorkspacesApi' do
|
31
|
+
expect(@instance).to be_instance_of(YousignClient::WorkspacesApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for workspaces_get
|
36
|
+
# List all Workspaces
|
37
|
+
# @param authorization Authentication credentials for HTTP authentication
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @return [Array<WorkspaceOutput>]
|
40
|
+
describe 'workspaces_get test' do
|
41
|
+
it 'should work' do
|
42
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
@@ -0,0 +1,243 @@
|
|
1
|
+
=begin
|
2
|
+
#Yousign API Swagger
|
3
|
+
|
4
|
+
#For your information, the Yousign API documentation is available at https://dev.yousign.com/
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.1
|
7
|
+
Contact: support@yousign.fr
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
|
15
|
+
describe YousignClient::ApiClient do
|
16
|
+
context 'initialization' do
|
17
|
+
context 'URL stuff' do
|
18
|
+
context 'host' do
|
19
|
+
it 'removes http from host' do
|
20
|
+
YousignClient.configure { |c| c.host = 'http://example.com' }
|
21
|
+
expect(YousignClient::Configuration.default.host).to eq('example.com')
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'removes https from host' do
|
25
|
+
YousignClient.configure { |c| c.host = 'https://wookiee.com' }
|
26
|
+
expect(YousignClient::ApiClient.default.config.host).to eq('wookiee.com')
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'removes trailing path from host' do
|
30
|
+
YousignClient.configure { |c| c.host = 'hobo.com/v4' }
|
31
|
+
expect(YousignClient::Configuration.default.host).to eq('hobo.com')
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
context 'base_path' do
|
36
|
+
it "prepends a slash to base_path" do
|
37
|
+
YousignClient.configure { |c| c.base_path = 'v4/dog' }
|
38
|
+
expect(YousignClient::Configuration.default.base_path).to eq('/v4/dog')
|
39
|
+
end
|
40
|
+
|
41
|
+
it "doesn't prepend a slash if one is already there" do
|
42
|
+
YousignClient.configure { |c| c.base_path = '/v4/dog' }
|
43
|
+
expect(YousignClient::Configuration.default.base_path).to eq('/v4/dog')
|
44
|
+
end
|
45
|
+
|
46
|
+
it "ends up as a blank string if nil" do
|
47
|
+
YousignClient.configure { |c| c.base_path = nil }
|
48
|
+
expect(YousignClient::Configuration.default.base_path).to eq('')
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
describe 'params_encoding in #build_request' do
|
55
|
+
let(:config) { YousignClient::Configuration.new }
|
56
|
+
let(:api_client) { YousignClient::ApiClient.new(config) }
|
57
|
+
|
58
|
+
it 'defaults to nil' do
|
59
|
+
expect(YousignClient::Configuration.default.params_encoding).to eq(nil)
|
60
|
+
expect(config.params_encoding).to eq(nil)
|
61
|
+
|
62
|
+
request = api_client.build_request(:get, '/test')
|
63
|
+
expect(request.options[:params_encoding]).to eq(nil)
|
64
|
+
end
|
65
|
+
|
66
|
+
it 'can be customized' do
|
67
|
+
config.params_encoding = :multi
|
68
|
+
request = api_client.build_request(:get, '/test')
|
69
|
+
expect(request.options[:params_encoding]).to eq(:multi)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
describe 'timeout in #build_request' do
|
74
|
+
let(:config) { YousignClient::Configuration.new }
|
75
|
+
let(:api_client) { YousignClient::ApiClient.new(config) }
|
76
|
+
|
77
|
+
it 'defaults to 0' do
|
78
|
+
expect(YousignClient::Configuration.default.timeout).to eq(0)
|
79
|
+
expect(config.timeout).to eq(0)
|
80
|
+
|
81
|
+
request = api_client.build_request(:get, '/test')
|
82
|
+
expect(request.options[:timeout]).to eq(0)
|
83
|
+
end
|
84
|
+
|
85
|
+
it 'can be customized' do
|
86
|
+
config.timeout = 100
|
87
|
+
request = api_client.build_request(:get, '/test')
|
88
|
+
expect(request.options[:timeout]).to eq(100)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
describe '#build_request' do
|
93
|
+
let(:config) { YousignClient::Configuration.new }
|
94
|
+
let(:api_client) { YousignClient::ApiClient.new(config) }
|
95
|
+
|
96
|
+
it 'does not send multipart to request' do
|
97
|
+
expect(Typhoeus::Request).to receive(:new).with(anything, hash_not_including(:multipart))
|
98
|
+
api_client.build_request(:get, '/test')
|
99
|
+
end
|
100
|
+
|
101
|
+
context 'when the content type is multipart' do
|
102
|
+
it 'sends multipart to request' do
|
103
|
+
expect(Typhoeus::Request).to receive(:new).with(anything, hash_including(multipart: true))
|
104
|
+
api_client.build_request(:get, '/test', {header_params: { 'Content-Type' => 'multipart/form-data'}})
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
describe '#deserialize' do
|
110
|
+
it "handles Array<Integer>" do
|
111
|
+
api_client = YousignClient::ApiClient.new
|
112
|
+
headers = { 'Content-Type' => 'application/json' }
|
113
|
+
response = double('response', headers: headers, body: '[12, 34]')
|
114
|
+
data = api_client.deserialize(response, 'Array<Integer>')
|
115
|
+
expect(data).to be_instance_of(Array)
|
116
|
+
expect(data).to eq([12, 34])
|
117
|
+
end
|
118
|
+
|
119
|
+
it 'handles Array<Array<Integer>>' do
|
120
|
+
api_client = YousignClient::ApiClient.new
|
121
|
+
headers = { 'Content-Type' => 'application/json' }
|
122
|
+
response = double('response', headers: headers, body: '[[12, 34], [56]]')
|
123
|
+
data = api_client.deserialize(response, 'Array<Array<Integer>>')
|
124
|
+
expect(data).to be_instance_of(Array)
|
125
|
+
expect(data).to eq([[12, 34], [56]])
|
126
|
+
end
|
127
|
+
|
128
|
+
it 'handles Hash<String, String>' do
|
129
|
+
api_client = YousignClient::ApiClient.new
|
130
|
+
headers = { 'Content-Type' => 'application/json' }
|
131
|
+
response = double('response', headers: headers, body: '{"message": "Hello"}')
|
132
|
+
data = api_client.deserialize(response, 'Hash<String, String>')
|
133
|
+
expect(data).to be_instance_of(Hash)
|
134
|
+
expect(data).to eq(:message => 'Hello')
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
describe "#object_to_hash" do
|
139
|
+
it 'ignores nils and includes empty arrays' do
|
140
|
+
# uncomment below to test object_to_hash for model
|
141
|
+
# api_client = YousignClient::ApiClient.new
|
142
|
+
# _model = YousignClient::ModelName.new
|
143
|
+
# update the model attribute below
|
144
|
+
# _model.id = 1
|
145
|
+
# update the expected value (hash) below
|
146
|
+
# expected = {id: 1, name: '', tags: []}
|
147
|
+
# expect(api_client.object_to_hash(_model)).to eq(expected)
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
151
|
+
describe '#build_collection_param' do
|
152
|
+
let(:param) { ['aa', 'bb', 'cc'] }
|
153
|
+
let(:api_client) { YousignClient::ApiClient.new }
|
154
|
+
|
155
|
+
it 'works for csv' do
|
156
|
+
expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
|
157
|
+
end
|
158
|
+
|
159
|
+
it 'works for ssv' do
|
160
|
+
expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc')
|
161
|
+
end
|
162
|
+
|
163
|
+
it 'works for tsv' do
|
164
|
+
expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc")
|
165
|
+
end
|
166
|
+
|
167
|
+
it 'works for pipes' do
|
168
|
+
expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc')
|
169
|
+
end
|
170
|
+
|
171
|
+
it 'works for multi' do
|
172
|
+
expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc'])
|
173
|
+
end
|
174
|
+
|
175
|
+
it 'fails for invalid collection format' do
|
176
|
+
expect(proc { api_client.build_collection_param(param, :INVALID) }).to raise_error(RuntimeError, 'unknown collection format: :INVALID')
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
describe '#json_mime?' do
|
181
|
+
let(:api_client) { YousignClient::ApiClient.new }
|
182
|
+
|
183
|
+
it 'works' do
|
184
|
+
expect(api_client.json_mime?(nil)).to eq false
|
185
|
+
expect(api_client.json_mime?('')).to eq false
|
186
|
+
|
187
|
+
expect(api_client.json_mime?('application/json')).to eq true
|
188
|
+
expect(api_client.json_mime?('application/json; charset=UTF8')).to eq true
|
189
|
+
expect(api_client.json_mime?('APPLICATION/JSON')).to eq true
|
190
|
+
|
191
|
+
expect(api_client.json_mime?('application/xml')).to eq false
|
192
|
+
expect(api_client.json_mime?('text/plain')).to eq false
|
193
|
+
expect(api_client.json_mime?('application/jsonp')).to eq false
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
describe '#select_header_accept' do
|
198
|
+
let(:api_client) { YousignClient::ApiClient.new }
|
199
|
+
|
200
|
+
it 'works' do
|
201
|
+
expect(api_client.select_header_accept(nil)).to be_nil
|
202
|
+
expect(api_client.select_header_accept([])).to be_nil
|
203
|
+
|
204
|
+
expect(api_client.select_header_accept(['application/json'])).to eq('application/json')
|
205
|
+
expect(api_client.select_header_accept(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
|
206
|
+
expect(api_client.select_header_accept(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
|
207
|
+
|
208
|
+
expect(api_client.select_header_accept(['application/xml'])).to eq('application/xml')
|
209
|
+
expect(api_client.select_header_accept(['text/html', 'application/xml'])).to eq('text/html,application/xml')
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
describe '#select_header_content_type' do
|
214
|
+
let(:api_client) { YousignClient::ApiClient.new }
|
215
|
+
|
216
|
+
it 'works' do
|
217
|
+
expect(api_client.select_header_content_type(nil)).to eq('application/json')
|
218
|
+
expect(api_client.select_header_content_type([])).to eq('application/json')
|
219
|
+
|
220
|
+
expect(api_client.select_header_content_type(['application/json'])).to eq('application/json')
|
221
|
+
expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
|
222
|
+
expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
|
223
|
+
expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml')
|
224
|
+
expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain')
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
describe '#sanitize_filename' do
|
229
|
+
let(:api_client) { YousignClient::ApiClient.new }
|
230
|
+
|
231
|
+
it 'works' do
|
232
|
+
expect(api_client.sanitize_filename('sun')).to eq('sun')
|
233
|
+
expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif')
|
234
|
+
expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif')
|
235
|
+
expect(api_client.sanitize_filename('/var/tmp/sun.gif')).to eq('sun.gif')
|
236
|
+
expect(api_client.sanitize_filename('./sun.gif')).to eq('sun.gif')
|
237
|
+
expect(api_client.sanitize_filename('..\sun.gif')).to eq('sun.gif')
|
238
|
+
expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq('sun.gif')
|
239
|
+
expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq('sun.gif')
|
240
|
+
expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif')
|
241
|
+
end
|
242
|
+
end
|
243
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
=begin
|
2
|
+
#Yousign API Swagger
|
3
|
+
|
4
|
+
#For your information, the Yousign API documentation is available at https://dev.yousign.com/
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.1
|
7
|
+
Contact: support@yousign.fr
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.14
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
|
15
|
+
describe YousignClient::Configuration do
|
16
|
+
let(:config) { YousignClient::Configuration.default }
|
17
|
+
|
18
|
+
before(:each) do
|
19
|
+
# uncomment below to setup host and base_path
|
20
|
+
# require 'URI'
|
21
|
+
# uri = URI.parse("https://api.yousign.com")
|
22
|
+
# YousignClient.configure do |c|
|
23
|
+
# c.host = uri.host
|
24
|
+
# c.base_path = uri.path
|
25
|
+
# end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe '#base_url' do
|
29
|
+
it 'should have the default value' do
|
30
|
+
# uncomment below to test default value of the base path
|
31
|
+
# expect(config.base_url).to eq("https://api.yousign.com")
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'should remove trailing slashes' do
|
35
|
+
[nil, '', '/', '//'].each do |base_path|
|
36
|
+
config.base_path = base_path
|
37
|
+
# uncomment below to test trailing slashes
|
38
|
+
# expect(config.base_url).to eq("https://api.yousign.com")
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|