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,432 @@
|
|
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 'date'
|
14
|
+
|
15
|
+
module YousignClient
|
16
|
+
class MemberOutput
|
17
|
+
# Id of the object
|
18
|
+
attr_accessor :id
|
19
|
+
|
20
|
+
# Internal user associated with the member. In this case, informations about the member will be informations of the user (first name, last name, phone number and email).
|
21
|
+
attr_accessor :user
|
22
|
+
|
23
|
+
# Type of a member. \"signer\" to sign documents (legally) and \"validator\" to validate documents.
|
24
|
+
attr_accessor :type
|
25
|
+
|
26
|
+
# Firstname of an external member.
|
27
|
+
attr_accessor :firstname
|
28
|
+
|
29
|
+
# Lastname of an external member.
|
30
|
+
attr_accessor :lastname
|
31
|
+
|
32
|
+
# Email of an external member.
|
33
|
+
attr_accessor :email
|
34
|
+
|
35
|
+
# Phone of an external member.
|
36
|
+
attr_accessor :phone
|
37
|
+
|
38
|
+
# Position of the member if ordered is set to true. Example with two members, the first one could have a position set to 1, the second one set to 2. In this case, when the procedure starts, only the first member will be notified and could validate the documents. The second one could not validate the documents, he will be notified when the first signer is notified.
|
39
|
+
attr_accessor :position
|
40
|
+
|
41
|
+
attr_accessor :created_at
|
42
|
+
|
43
|
+
attr_accessor :updated_at
|
44
|
+
|
45
|
+
attr_accessor :status
|
46
|
+
|
47
|
+
attr_accessor :file_objects
|
48
|
+
|
49
|
+
# Comment of a member when he refuses a signature
|
50
|
+
attr_accessor :comment
|
51
|
+
|
52
|
+
# Procedure id reference
|
53
|
+
attr_accessor :procedure
|
54
|
+
|
55
|
+
attr_accessor :operation_level
|
56
|
+
|
57
|
+
attr_accessor :operation_custom_modes
|
58
|
+
|
59
|
+
attr_accessor :mode_sms_configuration
|
60
|
+
|
61
|
+
class EnumAttributeValidator
|
62
|
+
attr_reader :datatype
|
63
|
+
attr_reader :allowable_values
|
64
|
+
|
65
|
+
def initialize(datatype, allowable_values)
|
66
|
+
@allowable_values = allowable_values.map do |value|
|
67
|
+
case datatype.to_s
|
68
|
+
when /Integer/i
|
69
|
+
value.to_i
|
70
|
+
when /Float/i
|
71
|
+
value.to_f
|
72
|
+
else
|
73
|
+
value
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
def valid?(value)
|
79
|
+
!value || allowable_values.include?(value)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
84
|
+
def self.attribute_map
|
85
|
+
{
|
86
|
+
:'id' => :'id',
|
87
|
+
:'user' => :'user',
|
88
|
+
:'type' => :'type',
|
89
|
+
:'firstname' => :'firstname',
|
90
|
+
:'lastname' => :'lastname',
|
91
|
+
:'email' => :'email',
|
92
|
+
:'phone' => :'phone',
|
93
|
+
:'position' => :'position',
|
94
|
+
:'created_at' => :'createdAt',
|
95
|
+
:'updated_at' => :'updatedAt',
|
96
|
+
:'status' => :'status',
|
97
|
+
:'file_objects' => :'fileObjects',
|
98
|
+
:'comment' => :'comment',
|
99
|
+
:'procedure' => :'procedure',
|
100
|
+
:'operation_level' => :'operationLevel',
|
101
|
+
:'operation_custom_modes' => :'operationCustomModes',
|
102
|
+
:'mode_sms_configuration' => :'modeSmsConfiguration'
|
103
|
+
}
|
104
|
+
end
|
105
|
+
|
106
|
+
# Attribute type mapping.
|
107
|
+
def self.swagger_types
|
108
|
+
{
|
109
|
+
:'id' => :'String',
|
110
|
+
:'user' => :'String',
|
111
|
+
:'type' => :'String',
|
112
|
+
:'firstname' => :'String',
|
113
|
+
:'lastname' => :'String',
|
114
|
+
:'email' => :'String',
|
115
|
+
:'phone' => :'String',
|
116
|
+
:'position' => :'Integer',
|
117
|
+
:'created_at' => :'DateTime',
|
118
|
+
:'updated_at' => :'DateTime',
|
119
|
+
:'status' => :'String',
|
120
|
+
:'file_objects' => :'Array<FileObjectOutput>',
|
121
|
+
:'comment' => :'String',
|
122
|
+
:'procedure' => :'String',
|
123
|
+
:'operation_level' => :'String',
|
124
|
+
:'operation_custom_modes' => :'Array<String>',
|
125
|
+
:'mode_sms_configuration' => :'ModeSmsConfiguration'
|
126
|
+
}
|
127
|
+
end
|
128
|
+
|
129
|
+
# Initializes the object
|
130
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
131
|
+
def initialize(attributes = {})
|
132
|
+
return unless attributes.is_a?(Hash)
|
133
|
+
|
134
|
+
# convert string to symbol for hash key
|
135
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
136
|
+
|
137
|
+
if attributes.has_key?(:'id')
|
138
|
+
self.id = attributes[:'id']
|
139
|
+
end
|
140
|
+
|
141
|
+
if attributes.has_key?(:'user')
|
142
|
+
self.user = attributes[:'user']
|
143
|
+
end
|
144
|
+
|
145
|
+
if attributes.has_key?(:'type')
|
146
|
+
self.type = attributes[:'type']
|
147
|
+
else
|
148
|
+
self.type = 'signer'
|
149
|
+
end
|
150
|
+
|
151
|
+
if attributes.has_key?(:'firstname')
|
152
|
+
self.firstname = attributes[:'firstname']
|
153
|
+
end
|
154
|
+
|
155
|
+
if attributes.has_key?(:'lastname')
|
156
|
+
self.lastname = attributes[:'lastname']
|
157
|
+
end
|
158
|
+
|
159
|
+
if attributes.has_key?(:'email')
|
160
|
+
self.email = attributes[:'email']
|
161
|
+
end
|
162
|
+
|
163
|
+
if attributes.has_key?(:'phone')
|
164
|
+
self.phone = attributes[:'phone']
|
165
|
+
end
|
166
|
+
|
167
|
+
if attributes.has_key?(:'position')
|
168
|
+
self.position = attributes[:'position']
|
169
|
+
end
|
170
|
+
|
171
|
+
if attributes.has_key?(:'createdAt')
|
172
|
+
self.created_at = attributes[:'createdAt']
|
173
|
+
end
|
174
|
+
|
175
|
+
if attributes.has_key?(:'updatedAt')
|
176
|
+
self.updated_at = attributes[:'updatedAt']
|
177
|
+
end
|
178
|
+
|
179
|
+
if attributes.has_key?(:'status')
|
180
|
+
self.status = attributes[:'status']
|
181
|
+
end
|
182
|
+
|
183
|
+
if attributes.has_key?(:'fileObjects')
|
184
|
+
if (value = attributes[:'fileObjects']).is_a?(Array)
|
185
|
+
self.file_objects = value
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
if attributes.has_key?(:'comment')
|
190
|
+
self.comment = attributes[:'comment']
|
191
|
+
end
|
192
|
+
|
193
|
+
if attributes.has_key?(:'procedure')
|
194
|
+
self.procedure = attributes[:'procedure']
|
195
|
+
end
|
196
|
+
|
197
|
+
if attributes.has_key?(:'operationLevel')
|
198
|
+
self.operation_level = attributes[:'operationLevel']
|
199
|
+
end
|
200
|
+
|
201
|
+
if attributes.has_key?(:'operationCustomModes')
|
202
|
+
if (value = attributes[:'operationCustomModes']).is_a?(Array)
|
203
|
+
self.operation_custom_modes = value
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
if attributes.has_key?(:'modeSmsConfiguration')
|
208
|
+
self.mode_sms_configuration = attributes[:'modeSmsConfiguration']
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
212
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
213
|
+
# @return Array for valid properties with the reasons
|
214
|
+
def list_invalid_properties
|
215
|
+
invalid_properties = Array.new
|
216
|
+
if !@id.nil? && @id !~ Regexp.new(/^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$/)
|
217
|
+
invalid_properties.push('invalid value for "id", must conform to the pattern /^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$/.')
|
218
|
+
end
|
219
|
+
|
220
|
+
if !@user.nil? && @user !~ Regexp.new(/^\/users\/[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$/)
|
221
|
+
invalid_properties.push('invalid value for "user", must conform to the pattern /^\/users\/[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$/.')
|
222
|
+
end
|
223
|
+
|
224
|
+
invalid_properties
|
225
|
+
end
|
226
|
+
|
227
|
+
# Check to see if the all the properties in the model are valid
|
228
|
+
# @return true if the model is valid
|
229
|
+
def valid?
|
230
|
+
return false if !@id.nil? && @id !~ Regexp.new(/^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$/)
|
231
|
+
return false if !@user.nil? && @user !~ Regexp.new(/^\/users\/[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$/)
|
232
|
+
type_validator = EnumAttributeValidator.new('String', ['signer', 'validator'])
|
233
|
+
return false unless type_validator.valid?(@type)
|
234
|
+
status_validator = EnumAttributeValidator.new('String', ['pending', 'processing', 'done', 'refused'])
|
235
|
+
return false unless status_validator.valid?(@status)
|
236
|
+
operation_level_validator = EnumAttributeValidator.new('String', ['none', 'custom'])
|
237
|
+
return false unless operation_level_validator.valid?(@operation_level)
|
238
|
+
true
|
239
|
+
end
|
240
|
+
|
241
|
+
# Custom attribute writer method with validation
|
242
|
+
# @param [Object] id Value to be assigned
|
243
|
+
def id=(id)
|
244
|
+
if !id.nil? && id !~ Regexp.new(/^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$/)
|
245
|
+
fail ArgumentError, 'invalid value for "id", must conform to the pattern /^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$/.'
|
246
|
+
end
|
247
|
+
|
248
|
+
@id = id
|
249
|
+
end
|
250
|
+
|
251
|
+
# Custom attribute writer method with validation
|
252
|
+
# @param [Object] user Value to be assigned
|
253
|
+
def user=(user)
|
254
|
+
if !user.nil? && user !~ Regexp.new(/^\/users\/[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$/)
|
255
|
+
fail ArgumentError, 'invalid value for "user", must conform to the pattern /^\/users\/[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$/.'
|
256
|
+
end
|
257
|
+
|
258
|
+
@user = user
|
259
|
+
end
|
260
|
+
|
261
|
+
# Custom attribute writer method checking allowed values (enum).
|
262
|
+
# @param [Object] type Object to be assigned
|
263
|
+
def type=(type)
|
264
|
+
validator = EnumAttributeValidator.new('String', ['signer', 'validator'])
|
265
|
+
unless validator.valid?(type)
|
266
|
+
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
|
267
|
+
end
|
268
|
+
@type = type
|
269
|
+
end
|
270
|
+
|
271
|
+
# Custom attribute writer method checking allowed values (enum).
|
272
|
+
# @param [Object] status Object to be assigned
|
273
|
+
def status=(status)
|
274
|
+
validator = EnumAttributeValidator.new('String', ['pending', 'processing', 'done', 'refused'])
|
275
|
+
unless validator.valid?(status)
|
276
|
+
fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
|
277
|
+
end
|
278
|
+
@status = status
|
279
|
+
end
|
280
|
+
|
281
|
+
# Custom attribute writer method checking allowed values (enum).
|
282
|
+
# @param [Object] operation_level Object to be assigned
|
283
|
+
def operation_level=(operation_level)
|
284
|
+
validator = EnumAttributeValidator.new('String', ['none', 'custom'])
|
285
|
+
unless validator.valid?(operation_level)
|
286
|
+
fail ArgumentError, 'invalid value for "operation_level", must be one of #{validator.allowable_values}.'
|
287
|
+
end
|
288
|
+
@operation_level = operation_level
|
289
|
+
end
|
290
|
+
|
291
|
+
# Checks equality by comparing each attribute.
|
292
|
+
# @param [Object] Object to be compared
|
293
|
+
def ==(o)
|
294
|
+
return true if self.equal?(o)
|
295
|
+
self.class == o.class &&
|
296
|
+
id == o.id &&
|
297
|
+
user == o.user &&
|
298
|
+
type == o.type &&
|
299
|
+
firstname == o.firstname &&
|
300
|
+
lastname == o.lastname &&
|
301
|
+
email == o.email &&
|
302
|
+
phone == o.phone &&
|
303
|
+
position == o.position &&
|
304
|
+
created_at == o.created_at &&
|
305
|
+
updated_at == o.updated_at &&
|
306
|
+
status == o.status &&
|
307
|
+
file_objects == o.file_objects &&
|
308
|
+
comment == o.comment &&
|
309
|
+
procedure == o.procedure &&
|
310
|
+
operation_level == o.operation_level &&
|
311
|
+
operation_custom_modes == o.operation_custom_modes &&
|
312
|
+
mode_sms_configuration == o.mode_sms_configuration
|
313
|
+
end
|
314
|
+
|
315
|
+
# @see the `==` method
|
316
|
+
# @param [Object] Object to be compared
|
317
|
+
def eql?(o)
|
318
|
+
self == o
|
319
|
+
end
|
320
|
+
|
321
|
+
# Calculates hash code according to all attributes.
|
322
|
+
# @return [Fixnum] Hash code
|
323
|
+
def hash
|
324
|
+
[id, user, type, firstname, lastname, email, phone, position, created_at, updated_at, status, file_objects, comment, procedure, operation_level, operation_custom_modes, mode_sms_configuration].hash
|
325
|
+
end
|
326
|
+
|
327
|
+
# Builds the object from hash
|
328
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
329
|
+
# @return [Object] Returns the model itself
|
330
|
+
def build_from_hash(attributes)
|
331
|
+
return nil unless attributes.is_a?(Hash)
|
332
|
+
self.class.swagger_types.each_pair do |key, type|
|
333
|
+
if type =~ /\AArray<(.*)>/i
|
334
|
+
# check to ensure the input is an array given that the attribute
|
335
|
+
# is documented as an array but the input is not
|
336
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
337
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
338
|
+
end
|
339
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
340
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
341
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
342
|
+
end
|
343
|
+
|
344
|
+
self
|
345
|
+
end
|
346
|
+
|
347
|
+
# Deserializes the data based on type
|
348
|
+
# @param string type Data type
|
349
|
+
# @param string value Value to be deserialized
|
350
|
+
# @return [Object] Deserialized data
|
351
|
+
def _deserialize(type, value)
|
352
|
+
case type.to_sym
|
353
|
+
when :DateTime
|
354
|
+
DateTime.parse(value)
|
355
|
+
when :Date
|
356
|
+
Date.parse(value)
|
357
|
+
when :String
|
358
|
+
value.to_s
|
359
|
+
when :Integer
|
360
|
+
value.to_i
|
361
|
+
when :Float
|
362
|
+
value.to_f
|
363
|
+
when :BOOLEAN
|
364
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
365
|
+
true
|
366
|
+
else
|
367
|
+
false
|
368
|
+
end
|
369
|
+
when :Object
|
370
|
+
# generic object (usually a Hash), return directly
|
371
|
+
value
|
372
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
373
|
+
inner_type = Regexp.last_match[:inner_type]
|
374
|
+
value.map { |v| _deserialize(inner_type, v) }
|
375
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
376
|
+
k_type = Regexp.last_match[:k_type]
|
377
|
+
v_type = Regexp.last_match[:v_type]
|
378
|
+
{}.tap do |hash|
|
379
|
+
value.each do |k, v|
|
380
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
381
|
+
end
|
382
|
+
end
|
383
|
+
else # model
|
384
|
+
temp_model = YousignClient.const_get(type).new
|
385
|
+
temp_model.build_from_hash(value)
|
386
|
+
end
|
387
|
+
end
|
388
|
+
|
389
|
+
# Returns the string representation of the object
|
390
|
+
# @return [String] String presentation of the object
|
391
|
+
def to_s
|
392
|
+
to_hash.to_s
|
393
|
+
end
|
394
|
+
|
395
|
+
# to_body is an alias to to_hash (backward compatibility)
|
396
|
+
# @return [Hash] Returns the object in the form of hash
|
397
|
+
def to_body
|
398
|
+
to_hash
|
399
|
+
end
|
400
|
+
|
401
|
+
# Returns the object in the form of hash
|
402
|
+
# @return [Hash] Returns the object in the form of hash
|
403
|
+
def to_hash
|
404
|
+
hash = {}
|
405
|
+
self.class.attribute_map.each_pair do |attr, param|
|
406
|
+
value = self.send(attr)
|
407
|
+
next if value.nil?
|
408
|
+
hash[param] = _to_hash(value)
|
409
|
+
end
|
410
|
+
hash
|
411
|
+
end
|
412
|
+
|
413
|
+
# Outputs non-array value in the form of hash
|
414
|
+
# For object, use to_hash. Otherwise, just return the value
|
415
|
+
# @param [Object] value Any valid value
|
416
|
+
# @return [Hash] Returns the value in the form of hash
|
417
|
+
def _to_hash(value)
|
418
|
+
if value.is_a?(Array)
|
419
|
+
value.compact.map { |v| _to_hash(v) }
|
420
|
+
elsif value.is_a?(Hash)
|
421
|
+
{}.tap do |hash|
|
422
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
423
|
+
end
|
424
|
+
elsif value.respond_to? :to_hash
|
425
|
+
value.to_hash
|
426
|
+
else
|
427
|
+
value
|
428
|
+
end
|
429
|
+
end
|
430
|
+
|
431
|
+
end
|
432
|
+
end
|
@@ -0,0 +1,190 @@
|
|
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 'date'
|
14
|
+
|
15
|
+
module YousignClient
|
16
|
+
class ModeSmsConfiguration
|
17
|
+
# Content of your custom sms message. Should contains the substring `{{code}}`
|
18
|
+
attr_accessor :content
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'content' => :'content'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Attribute type mapping.
|
28
|
+
def self.swagger_types
|
29
|
+
{
|
30
|
+
:'content' => :'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?(:'content')
|
43
|
+
self.content = attributes[:'content']
|
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
|
+
if @content.nil?
|
52
|
+
invalid_properties.push('invalid value for "content", content cannot be nil.')
|
53
|
+
end
|
54
|
+
|
55
|
+
invalid_properties
|
56
|
+
end
|
57
|
+
|
58
|
+
# Check to see if the all the properties in the model are valid
|
59
|
+
# @return true if the model is valid
|
60
|
+
def valid?
|
61
|
+
return false if @content.nil?
|
62
|
+
true
|
63
|
+
end
|
64
|
+
|
65
|
+
# Checks equality by comparing each attribute.
|
66
|
+
# @param [Object] Object to be compared
|
67
|
+
def ==(o)
|
68
|
+
return true if self.equal?(o)
|
69
|
+
self.class == o.class &&
|
70
|
+
content == o.content
|
71
|
+
end
|
72
|
+
|
73
|
+
# @see the `==` method
|
74
|
+
# @param [Object] Object to be compared
|
75
|
+
def eql?(o)
|
76
|
+
self == o
|
77
|
+
end
|
78
|
+
|
79
|
+
# Calculates hash code according to all attributes.
|
80
|
+
# @return [Fixnum] Hash code
|
81
|
+
def hash
|
82
|
+
[content].hash
|
83
|
+
end
|
84
|
+
|
85
|
+
# Builds the object from hash
|
86
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
87
|
+
# @return [Object] Returns the model itself
|
88
|
+
def build_from_hash(attributes)
|
89
|
+
return nil unless attributes.is_a?(Hash)
|
90
|
+
self.class.swagger_types.each_pair do |key, type|
|
91
|
+
if type =~ /\AArray<(.*)>/i
|
92
|
+
# check to ensure the input is an array given that the attribute
|
93
|
+
# is documented as an array but the input is not
|
94
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
95
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
96
|
+
end
|
97
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
98
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
99
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
100
|
+
end
|
101
|
+
|
102
|
+
self
|
103
|
+
end
|
104
|
+
|
105
|
+
# Deserializes the data based on type
|
106
|
+
# @param string type Data type
|
107
|
+
# @param string value Value to be deserialized
|
108
|
+
# @return [Object] Deserialized data
|
109
|
+
def _deserialize(type, value)
|
110
|
+
case type.to_sym
|
111
|
+
when :DateTime
|
112
|
+
DateTime.parse(value)
|
113
|
+
when :Date
|
114
|
+
Date.parse(value)
|
115
|
+
when :String
|
116
|
+
value.to_s
|
117
|
+
when :Integer
|
118
|
+
value.to_i
|
119
|
+
when :Float
|
120
|
+
value.to_f
|
121
|
+
when :BOOLEAN
|
122
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
123
|
+
true
|
124
|
+
else
|
125
|
+
false
|
126
|
+
end
|
127
|
+
when :Object
|
128
|
+
# generic object (usually a Hash), return directly
|
129
|
+
value
|
130
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
131
|
+
inner_type = Regexp.last_match[:inner_type]
|
132
|
+
value.map { |v| _deserialize(inner_type, v) }
|
133
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
134
|
+
k_type = Regexp.last_match[:k_type]
|
135
|
+
v_type = Regexp.last_match[:v_type]
|
136
|
+
{}.tap do |hash|
|
137
|
+
value.each do |k, v|
|
138
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
139
|
+
end
|
140
|
+
end
|
141
|
+
else # model
|
142
|
+
temp_model = YousignClient.const_get(type).new
|
143
|
+
temp_model.build_from_hash(value)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
# Returns the string representation of the object
|
148
|
+
# @return [String] String presentation of the object
|
149
|
+
def to_s
|
150
|
+
to_hash.to_s
|
151
|
+
end
|
152
|
+
|
153
|
+
# to_body is an alias to to_hash (backward compatibility)
|
154
|
+
# @return [Hash] Returns the object in the form of hash
|
155
|
+
def to_body
|
156
|
+
to_hash
|
157
|
+
end
|
158
|
+
|
159
|
+
# Returns the object in the form of hash
|
160
|
+
# @return [Hash] Returns the object in the form of hash
|
161
|
+
def to_hash
|
162
|
+
hash = {}
|
163
|
+
self.class.attribute_map.each_pair do |attr, param|
|
164
|
+
value = self.send(attr)
|
165
|
+
next if value.nil?
|
166
|
+
hash[param] = _to_hash(value)
|
167
|
+
end
|
168
|
+
hash
|
169
|
+
end
|
170
|
+
|
171
|
+
# Outputs non-array value in the form of hash
|
172
|
+
# For object, use to_hash. Otherwise, just return the value
|
173
|
+
# @param [Object] value Any valid value
|
174
|
+
# @return [Hash] Returns the value in the form of hash
|
175
|
+
def _to_hash(value)
|
176
|
+
if value.is_a?(Array)
|
177
|
+
value.compact.map { |v| _to_hash(v) }
|
178
|
+
elsif value.is_a?(Hash)
|
179
|
+
{}.tap do |hash|
|
180
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
181
|
+
end
|
182
|
+
elsif value.respond_to? :to_hash
|
183
|
+
value.to_hash
|
184
|
+
else
|
185
|
+
value
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
end
|
190
|
+
end
|