docusign_maestro 1.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +35 -0
  3. data/README.md +230 -0
  4. data/docusign_maestro.gemspec +48 -0
  5. data/lib/docusign_maestro/api/workflow_instance_management_api.rb +248 -0
  6. data/lib/docusign_maestro/api/workflow_management_api.rb +440 -0
  7. data/lib/docusign_maestro/api/workflow_trigger_api.rb +95 -0
  8. data/lib/docusign_maestro/client/api_client.rb +600 -0
  9. data/lib/docusign_maestro/client/api_error.rb +37 -0
  10. data/lib/docusign_maestro/client/auth/oauth.rb +1061 -0
  11. data/lib/docusign_maestro/configuration.rb +203 -0
  12. data/lib/docusign_maestro/models/access_token_response.rb +204 -0
  13. data/lib/docusign_maestro/models/access_token_token_types.rb +30 -0
  14. data/lib/docusign_maestro/models/account_id.rb +175 -0
  15. data/lib/docusign_maestro/models/aow_uuid.rb +174 -0
  16. data/lib/docusign_maestro/models/aow_uuid_string.rb +174 -0
  17. data/lib/docusign_maestro/models/cancel_response.rb +197 -0
  18. data/lib/docusign_maestro/models/create_or_update_workflow_definition_request_body.rb +184 -0
  19. data/lib/docusign_maestro/models/deploy_request.rb +188 -0
  20. data/lib/docusign_maestro/models/deploy_response.rb +220 -0
  21. data/lib/docusign_maestro/models/deploy_status.rb +30 -0
  22. data/lib/docusign_maestro/models/deployment_status.rb +33 -0
  23. data/lib/docusign_maestro/models/ds_do_until_step.rb +247 -0
  24. data/lib/docusign_maestro/models/ds_doc_gen_step.rb +261 -0
  25. data/lib/docusign_maestro/models/ds_doc_gen_step_input.rb +246 -0
  26. data/lib/docusign_maestro/models/ds_idv_step.rb +261 -0
  27. data/lib/docusign_maestro/models/ds_idv_step_input.rb +234 -0
  28. data/lib/docusign_maestro/models/ds_if_else_step.rb +264 -0
  29. data/lib/docusign_maestro/models/ds_loop_step.rb +247 -0
  30. data/lib/docusign_maestro/models/ds_parallel_step.rb +246 -0
  31. data/lib/docusign_maestro/models/ds_service_step.rb +175 -0
  32. data/lib/docusign_maestro/models/ds_sign_step.rb +261 -0
  33. data/lib/docusign_maestro/models/ds_sign_step_input.rb +241 -0
  34. data/lib/docusign_maestro/models/ds_step_id.rb +175 -0
  35. data/lib/docusign_maestro/models/ds_transformation_step.rb +279 -0
  36. data/lib/docusign_maestro/models/ds_web_forms_step.rb +265 -0
  37. data/lib/docusign_maestro/models/ds_web_forms_step_config.rb +188 -0
  38. data/lib/docusign_maestro/models/ds_workflow_boolean_expression.rb +219 -0
  39. data/lib/docusign_maestro/models/ds_workflow_comparison_expression.rb +232 -0
  40. data/lib/docusign_maestro/models/ds_workflow_comparison_operator_types.rb +39 -0
  41. data/lib/docusign_maestro/models/ds_workflow_concat_expression.rb +200 -0
  42. data/lib/docusign_maestro/models/ds_workflow_doc_gen_doc_output_format.rb +29 -0
  43. data/lib/docusign_maestro/models/ds_workflow_expression_types_boolean_expression.rb +28 -0
  44. data/lib/docusign_maestro/models/ds_workflow_expression_types_comparison_expression.rb +28 -0
  45. data/lib/docusign_maestro/models/ds_workflow_expression_types_parallel_expression.rb +28 -0
  46. data/lib/docusign_maestro/models/ds_workflow_index_of_expression.rb +218 -0
  47. data/lib/docusign_maestro/models/ds_workflow_lane.rb +205 -0
  48. data/lib/docusign_maestro/models/ds_workflow_lanes_record.rb +174 -0
  49. data/lib/docusign_maestro/models/ds_workflow_last_index_of_expression.rb +218 -0
  50. data/lib/docusign_maestro/models/ds_workflow_logical_operator_types.rb +29 -0
  51. data/lib/docusign_maestro/models/ds_workflow_parallel_expression.rb +204 -0
  52. data/lib/docusign_maestro/models/ds_workflow_participant_record.rb +175 -0
  53. data/lib/docusign_maestro/models/ds_workflow_replace_expression.rb +233 -0
  54. data/lib/docusign_maestro/models/ds_workflow_step.rb +175 -0
  55. data/lib/docusign_maestro/models/ds_workflow_step_types_do_until.rb +28 -0
  56. data/lib/docusign_maestro/models/ds_workflow_step_types_ds_doc_gen.rb +28 -0
  57. data/lib/docusign_maestro/models/ds_workflow_step_types_ds_idv.rb +28 -0
  58. data/lib/docusign_maestro/models/ds_workflow_step_types_ds_if_else.rb +28 -0
  59. data/lib/docusign_maestro/models/ds_workflow_step_types_ds_sign.rb +28 -0
  60. data/lib/docusign_maestro/models/ds_workflow_step_types_ds_transformation.rb +28 -0
  61. data/lib/docusign_maestro/models/ds_workflow_step_types_ds_web_forms.rb +28 -0
  62. data/lib/docusign_maestro/models/ds_workflow_step_types_loop.rb +28 -0
  63. data/lib/docusign_maestro/models/ds_workflow_step_types_parallel.rb +28 -0
  64. data/lib/docusign_maestro/models/ds_workflow_substring_expression.rb +228 -0
  65. data/lib/docusign_maestro/models/ds_workflow_to_lower_expression.rb +203 -0
  66. data/lib/docusign_maestro/models/ds_workflow_to_upper_expression.rb +203 -0
  67. data/lib/docusign_maestro/models/ds_workflow_transformation_expression.rb +175 -0
  68. data/lib/docusign_maestro/models/ds_workflow_transformation_expression_types_concat_expression.rb +28 -0
  69. data/lib/docusign_maestro/models/ds_workflow_transformation_expression_types_index_of_expression.rb +28 -0
  70. data/lib/docusign_maestro/models/ds_workflow_transformation_expression_types_last_index_of_expression.rb +28 -0
  71. data/lib/docusign_maestro/models/ds_workflow_transformation_expression_types_replace_expression.rb +28 -0
  72. data/lib/docusign_maestro/models/ds_workflow_transformation_expression_types_substring_expression.rb +28 -0
  73. data/lib/docusign_maestro/models/ds_workflow_transformation_expression_types_to_lower_expression.rb +28 -0
  74. data/lib/docusign_maestro/models/ds_workflow_transformation_expression_types_to_upper_expression.rb +28 -0
  75. data/lib/docusign_maestro/models/ds_workflow_trigger.rb +274 -0
  76. data/lib/docusign_maestro/models/ds_workflow_trigger_types.rb +29 -0
  77. data/lib/docusign_maestro/models/ds_workflow_variable.rb +175 -0
  78. data/lib/docusign_maestro/models/ds_workflow_variable_from_participant.rb +217 -0
  79. data/lib/docusign_maestro/models/ds_workflow_variable_from_step.rb +231 -0
  80. data/lib/docusign_maestro/models/ds_workflow_variable_from_variable.rb +231 -0
  81. data/lib/docusign_maestro/models/ds_workflow_variable_record.rb +175 -0
  82. data/lib/docusign_maestro/models/ds_workflow_variable_source_types_participant.rb +28 -0
  83. data/lib/docusign_maestro/models/ds_workflow_variable_source_types_step.rb +28 -0
  84. data/lib/docusign_maestro/models/ds_workflow_variable_source_types_variable.rb +28 -0
  85. data/lib/docusign_maestro/models/e_sign_document_from_e_sign_template.rb +231 -0
  86. data/lib/docusign_maestro/models/e_sign_document_from_previous_step.rb +232 -0
  87. data/lib/docusign_maestro/models/e_sign_document_types_from_ds_template.rb +28 -0
  88. data/lib/docusign_maestro/models/e_sign_document_types_from_previous_step.rb +28 -0
  89. data/lib/docusign_maestro/models/e_sign_documents.rb +175 -0
  90. data/lib/docusign_maestro/models/e_sign_locale_policy.rb +174 -0
  91. data/lib/docusign_maestro/models/e_sign_signer.rb +247 -0
  92. data/lib/docusign_maestro/models/e_sign_tabs.rb +416 -0
  93. data/lib/docusign_maestro/models/e_sign_tabs_record.rb +251 -0
  94. data/lib/docusign_maestro/models/error_codes.rb +44 -0
  95. data/lib/docusign_maestro/models/error_response.rb +193 -0
  96. data/lib/docusign_maestro/models/event_types.rb +31 -0
  97. data/lib/docusign_maestro/models/get_configuration_instance_response.rb +201 -0
  98. data/lib/docusign_maestro/models/get_configuration_instances_response.rb +203 -0
  99. data/lib/docusign_maestro/models/get_configuration_instances_response_config_instances.rb +192 -0
  100. data/lib/docusign_maestro/models/http_types.rb +31 -0
  101. data/lib/docusign_maestro/models/invalid_workflow_response.rb +204 -0
  102. data/lib/docusign_maestro/models/last_deployed_id.rb +174 -0
  103. data/lib/docusign_maestro/models/new_or_updated_workflow_definition_response.rb +232 -0
  104. data/lib/docusign_maestro/models/number_or_variable.rb +175 -0
  105. data/lib/docusign_maestro/models/participant.rb +231 -0
  106. data/lib/docusign_maestro/models/participant_keys.rb +30 -0
  107. data/lib/docusign_maestro/models/progress_instance.rb +205 -0
  108. data/lib/docusign_maestro/models/record_string_boolean.rb +174 -0
  109. data/lib/docusign_maestro/models/record_string_or_variable_or_transformation.rb +175 -0
  110. data/lib/docusign_maestro/models/record_to_never.rb +174 -0
  111. data/lib/docusign_maestro/models/replication_status.rb +37 -0
  112. data/lib/docusign_maestro/models/started_by_instance.rb +237 -0
  113. data/lib/docusign_maestro/models/string_or_variable_or_transformation.rb +175 -0
  114. data/lib/docusign_maestro/models/success_message_response.rb +184 -0
  115. data/lib/docusign_maestro/models/template_id.rb +175 -0
  116. data/lib/docusign_maestro/models/trigger_payload.rb +211 -0
  117. data/lib/docusign_maestro/models/trigger_workflow_via_post_response.rb +194 -0
  118. data/lib/docusign_maestro/models/user_id.rb +175 -0
  119. data/lib/docusign_maestro/models/validation_errors.rb +202 -0
  120. data/lib/docusign_maestro/models/version_string.rb +174 -0
  121. data/lib/docusign_maestro/models/workflow_creator_id.rb +175 -0
  122. data/lib/docusign_maestro/models/workflow_date_time.rb +174 -0
  123. data/lib/docusign_maestro/models/workflow_definition.rb +315 -0
  124. data/lib/docusign_maestro/models/workflow_definition_list.rb +197 -0
  125. data/lib/docusign_maestro/models/workflow_definition_metadata.rb +272 -0
  126. data/lib/docusign_maestro/models/workflow_definition_with_id.rb +292 -0
  127. data/lib/docusign_maestro/models/workflow_delete_response.rb +202 -0
  128. data/lib/docusign_maestro/models/workflow_instance.rb +304 -0
  129. data/lib/docusign_maestro/models/workflow_instance_id.rb +175 -0
  130. data/lib/docusign_maestro/models/workflow_instance_map.rb +174 -0
  131. data/lib/docusign_maestro/models/workflow_instance_state.rb +30 -0
  132. data/lib/docusign_maestro/models/workflow_instances_list.rb +175 -0
  133. data/lib/docusign_maestro/models/workflow_metadata_status.rb +33 -0
  134. data/lib/docusign_maestro/models/workflow_step_error.rb +224 -0
  135. data/lib/docusign_maestro/models/workflow_step_error_error.rb +194 -0
  136. data/lib/docusign_maestro/models/workflow_step_history.rb +298 -0
  137. data/lib/docusign_maestro/models/workflow_step_history_list.rb +175 -0
  138. data/lib/docusign_maestro/models/workflow_step_history_state.rb +30 -0
  139. data/lib/docusign_maestro/version.rb +14 -0
  140. data/lib/docusign_maestro.rb +160 -0
  141. data/runLinter.sh +1 -0
  142. metadata +446 -0
@@ -0,0 +1,232 @@
1
+ =begin
2
+ #Maestro API
3
+
4
+ #Maestro authors and executes experiences that allow non-coders the ability to define Simple Business Process without having to write code and to deploy them seamlessly without having to have development expertise
5
+
6
+ OpenAPI spec version: 1.0.0
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_Maestro
15
+ class ESignDocumentFromPreviousStep
16
+ # Reference of #/definitions/DSWorkflowVariable. DS Workflow Variables
17
+ attr_accessor :document_from_previous_step
18
+
19
+ attr_accessor :file_extension
20
+
21
+ # Reference of #/definitions/StringOrVariableOrTransformation. Object stands for a String or a Variable or a Transformation. This object should be any of the following object models or types: [string, #/definitions/DSWorkflowVariable, #/definitions/DSWorkflowTransformationExpression]
22
+ attr_accessor :name
23
+
24
+ attr_accessor :type
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'document_from_previous_step' => :'documentFromPreviousStep',
30
+ :'file_extension' => :'fileExtension',
31
+ :'name' => :'name',
32
+ :'type' => :'type'
33
+ }
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.swagger_types
38
+ {
39
+ :'document_from_previous_step' => :'Object',
40
+ :'file_extension' => :'DSWorkflowDocGenDocOutputFormat',
41
+ :'name' => :'Object',
42
+ :'type' => :'ESignDocumentTypesFromPreviousStep'
43
+ }
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ return unless attributes.is_a?(Hash)
50
+
51
+ # convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
53
+
54
+ if attributes.has_key?(:'documentFromPreviousStep')
55
+ self.document_from_previous_step = attributes[:'documentFromPreviousStep']
56
+ end
57
+
58
+ if attributes.has_key?(:'fileExtension')
59
+ self.file_extension = attributes[:'fileExtension']
60
+ end
61
+
62
+ if attributes.has_key?(:'name')
63
+ self.name = attributes[:'name']
64
+ end
65
+
66
+ if attributes.has_key?(:'type')
67
+ self.type = attributes[:'type']
68
+ end
69
+ end
70
+
71
+ # Show invalid properties with the reasons. Usually used together with valid?
72
+ # @return Array for valid properties with the reasons
73
+ def list_invalid_properties
74
+ invalid_properties = Array.new
75
+ if @document_from_previous_step.nil?
76
+ invalid_properties.push('invalid value for "document_from_previous_step", document_from_previous_step cannot be nil.')
77
+ end
78
+
79
+ if @file_extension.nil?
80
+ invalid_properties.push('invalid value for "file_extension", file_extension cannot be nil.')
81
+ end
82
+
83
+ if @name.nil?
84
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
85
+ end
86
+
87
+ if @type.nil?
88
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
89
+ end
90
+
91
+ invalid_properties
92
+ end
93
+
94
+ # Check to see if the all the properties in the model are valid
95
+ # @return true if the model is valid
96
+ def valid?
97
+ return false if @document_from_previous_step.nil?
98
+ return false if @file_extension.nil?
99
+ return false if @name.nil?
100
+ return false if @type.nil?
101
+ true
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ document_from_previous_step == o.document_from_previous_step &&
110
+ file_extension == o.file_extension &&
111
+ name == o.name &&
112
+ type == o.type
113
+ end
114
+
115
+ # @see the `==` method
116
+ # @param [Object] Object to be compared
117
+ def eql?(o)
118
+ self == o
119
+ end
120
+
121
+ # Calculates hash code according to all attributes.
122
+ # @return [Fixnum] Hash code
123
+ def hash
124
+ [document_from_previous_step, file_extension, name, type].hash
125
+ end
126
+
127
+ # Builds the object from hash
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ # @return [Object] Returns the model itself
130
+ def build_from_hash(attributes)
131
+ return nil unless attributes.is_a?(Hash)
132
+ self.class.swagger_types.each_pair do |key, type|
133
+ if type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
137
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
138
+ end
139
+ elsif !attributes[self.class.attribute_map[key]].nil?
140
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
141
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
142
+ end
143
+
144
+ self
145
+ end
146
+
147
+ # Deserializes the data based on type
148
+ # @param string type Data type
149
+ # @param string value Value to be deserialized
150
+ # @return [Object] Deserialized data
151
+ def _deserialize(type, value)
152
+ case type.to_sym
153
+ when :DateTime
154
+ DateTime.parse(value)
155
+ when :Date
156
+ Date.parse(value)
157
+ when :String
158
+ value.to_s
159
+ when :Integer
160
+ value.to_i
161
+ when :Float
162
+ value.to_f
163
+ when :BOOLEAN
164
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
165
+ true
166
+ else
167
+ false
168
+ end
169
+ when :Object
170
+ # generic object (usually a Hash), return directly
171
+ value
172
+ when /\AArray<(?<inner_type>.+)>\z/
173
+ inner_type = Regexp.last_match[:inner_type]
174
+ value.map { |v| _deserialize(inner_type, v) }
175
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
176
+ k_type = Regexp.last_match[:k_type]
177
+ v_type = Regexp.last_match[:v_type]
178
+ {}.tap do |hash|
179
+ value.each do |k, v|
180
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
181
+ end
182
+ end
183
+ else # model
184
+ temp_model = DocuSign_Maestro.const_get(type).new
185
+ temp_model.build_from_hash(value)
186
+ end
187
+ end
188
+
189
+ # Returns the string representation of the object
190
+ # @return [String] String presentation of the object
191
+ def to_s
192
+ to_hash.to_s
193
+ end
194
+
195
+ # to_body is an alias to to_hash (backward compatibility)
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_body
198
+ to_hash
199
+ end
200
+
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ next if value.nil?
208
+ hash[param] = _to_hash(value)
209
+ end
210
+ hash
211
+ end
212
+
213
+ # Outputs non-array value in the form of hash
214
+ # For object, use to_hash. Otherwise, just return the value
215
+ # @param [Object] value Any valid value
216
+ # @return [Hash] Returns the value in the form of hash
217
+ def _to_hash(value)
218
+ if value.is_a?(Array)
219
+ value.compact.map { |v| _to_hash(v) }
220
+ elsif value.is_a?(Hash)
221
+ {}.tap do |hash|
222
+ value.each { |k, v| hash[k] = _to_hash(v) }
223
+ end
224
+ elsif value.respond_to? :to_hash
225
+ value.to_hash
226
+ else
227
+ value
228
+ end
229
+ end
230
+
231
+ end
232
+ end
@@ -0,0 +1,28 @@
1
+ =begin
2
+ #Maestro API
3
+
4
+ #Maestro authors and executes experiences that allow non-coders the ability to define Simple Business Process without having to write code and to deploy them seamlessly without having to have development expertise
5
+
6
+ OpenAPI spec version: 1.0.0
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_Maestro
15
+ class ESignDocumentTypesFromDSTemplate
16
+
17
+ FROM_DS_TEMPLATE = 'FromDSTemplate'.freeze
18
+
19
+ # Builds the enum from string
20
+ # @param [String] The enum value in the form of the string
21
+ # @return [String] The enum value
22
+ def build_from_hash(value)
23
+ constantValues = ESignDocumentTypesFromDSTemplate.constants.select { |c| ESignDocumentTypesFromDSTemplate::const_get(c) == value }
24
+ raise "Invalid ENUM value #{value} for class #ESignDocumentTypesFromDSTemplate" if constantValues.empty?
25
+ value
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,28 @@
1
+ =begin
2
+ #Maestro API
3
+
4
+ #Maestro authors and executes experiences that allow non-coders the ability to define Simple Business Process without having to write code and to deploy them seamlessly without having to have development expertise
5
+
6
+ OpenAPI spec version: 1.0.0
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_Maestro
15
+ class ESignDocumentTypesFromPreviousStep
16
+
17
+ FROM_PREVIOUS_STEP = 'FromPreviousStep'.freeze
18
+
19
+ # Builds the enum from string
20
+ # @param [String] The enum value in the form of the string
21
+ # @return [String] The enum value
22
+ def build_from_hash(value)
23
+ constantValues = ESignDocumentTypesFromPreviousStep.constants.select { |c| ESignDocumentTypesFromPreviousStep::const_get(c) == value }
24
+ raise "Invalid ENUM value #{value} for class #ESignDocumentTypesFromPreviousStep" if constantValues.empty?
25
+ value
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,175 @@
1
+ =begin
2
+ #Maestro API
3
+
4
+ #Maestro authors and executes experiences that allow non-coders the ability to define Simple Business Process without having to write code and to deploy them seamlessly without having to have development expertise
5
+
6
+ OpenAPI spec version: 1.0.0
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_Maestro
15
+ # ESignDocument Object. This object should be any of the following object models: [#/definitions/ESignDocumentFromPreviousStep, #/definitions/ESignDocumentFromESignTemplate]
16
+ class ESignDocuments
17
+ # Attribute mapping from ruby-style variable name to JSON key.
18
+ def self.attribute_map
19
+ {
20
+ }
21
+ end
22
+
23
+ # Attribute type mapping.
24
+ def self.swagger_types
25
+ {
26
+ }
27
+ end
28
+
29
+ # Initializes the object
30
+ # @param [Hash] attributes Model attributes in the form of hash
31
+ def initialize(attributes = {})
32
+ return unless attributes.is_a?(Hash)
33
+
34
+ # convert string to symbol for hash key
35
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
36
+ end
37
+
38
+ # Show invalid properties with the reasons. Usually used together with valid?
39
+ # @return Array for valid properties with the reasons
40
+ def list_invalid_properties
41
+ invalid_properties = Array.new
42
+ invalid_properties
43
+ end
44
+
45
+ # Check to see if the all the properties in the model are valid
46
+ # @return true if the model is valid
47
+ def valid?
48
+ true
49
+ end
50
+
51
+ # Checks equality by comparing each attribute.
52
+ # @param [Object] Object to be compared
53
+ def ==(o)
54
+ return true if self.equal?(o)
55
+ self.class == o.class
56
+ end
57
+
58
+ # @see the `==` method
59
+ # @param [Object] Object to be compared
60
+ def eql?(o)
61
+ self == o
62
+ end
63
+
64
+ # Calculates hash code according to all attributes.
65
+ # @return [Fixnum] Hash code
66
+ def hash
67
+ [].hash
68
+ end
69
+
70
+ # Builds the object from hash
71
+ # @param [Hash] attributes Model attributes in the form of hash
72
+ # @return [Object] Returns the model itself
73
+ def build_from_hash(attributes)
74
+ return nil unless attributes.is_a?(Hash)
75
+ self.class.swagger_types.each_pair do |key, type|
76
+ if type =~ /\AArray<(.*)>/i
77
+ # check to ensure the input is an array given that the attribute
78
+ # is documented as an array but the input is not
79
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
80
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
81
+ end
82
+ elsif !attributes[self.class.attribute_map[key]].nil?
83
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
84
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
85
+ end
86
+
87
+ self
88
+ end
89
+
90
+ # Deserializes the data based on type
91
+ # @param string type Data type
92
+ # @param string value Value to be deserialized
93
+ # @return [Object] Deserialized data
94
+ def _deserialize(type, value)
95
+ case type.to_sym
96
+ when :DateTime
97
+ DateTime.parse(value)
98
+ when :Date
99
+ Date.parse(value)
100
+ when :String
101
+ value.to_s
102
+ when :Integer
103
+ value.to_i
104
+ when :Float
105
+ value.to_f
106
+ when :BOOLEAN
107
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
108
+ true
109
+ else
110
+ false
111
+ end
112
+ when :Object
113
+ # generic object (usually a Hash), return directly
114
+ value
115
+ when /\AArray<(?<inner_type>.+)>\z/
116
+ inner_type = Regexp.last_match[:inner_type]
117
+ value.map { |v| _deserialize(inner_type, v) }
118
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
119
+ k_type = Regexp.last_match[:k_type]
120
+ v_type = Regexp.last_match[:v_type]
121
+ {}.tap do |hash|
122
+ value.each do |k, v|
123
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
124
+ end
125
+ end
126
+ else # model
127
+ temp_model = DocuSign_Maestro.const_get(type).new
128
+ temp_model.build_from_hash(value)
129
+ end
130
+ end
131
+
132
+ # Returns the string representation of the object
133
+ # @return [String] String presentation of the object
134
+ def to_s
135
+ to_hash.to_s
136
+ end
137
+
138
+ # to_body is an alias to to_hash (backward compatibility)
139
+ # @return [Hash] Returns the object in the form of hash
140
+ def to_body
141
+ to_hash
142
+ end
143
+
144
+ # Returns the object in the form of hash
145
+ # @return [Hash] Returns the object in the form of hash
146
+ def to_hash
147
+ hash = {}
148
+ self.class.attribute_map.each_pair do |attr, param|
149
+ value = self.send(attr)
150
+ next if value.nil?
151
+ hash[param] = _to_hash(value)
152
+ end
153
+ hash
154
+ end
155
+
156
+ # Outputs non-array value in the form of hash
157
+ # For object, use to_hash. Otherwise, just return the value
158
+ # @param [Object] value Any valid value
159
+ # @return [Hash] Returns the value in the form of hash
160
+ def _to_hash(value)
161
+ if value.is_a?(Array)
162
+ value.compact.map { |v| _to_hash(v) }
163
+ elsif value.is_a?(Hash)
164
+ {}.tap do |hash|
165
+ value.each { |k, v| hash[k] = _to_hash(v) }
166
+ end
167
+ elsif value.respond_to? :to_hash
168
+ value.to_hash
169
+ else
170
+ value
171
+ end
172
+ end
173
+
174
+ end
175
+ end
@@ -0,0 +1,174 @@
1
+ =begin
2
+ #Maestro API
3
+
4
+ #Maestro authors and executes experiences that allow non-coders the ability to define Simple Business Process without having to write code and to deploy them seamlessly without having to have development expertise
5
+
6
+ OpenAPI spec version: 1.0.0
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_Maestro
15
+ class ESignLocalePolicy
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<(?<inner_type>.+)>\z/
115
+ inner_type = Regexp.last_match[:inner_type]
116
+ value.map { |v| _deserialize(inner_type, v) }
117
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\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_Maestro.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