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,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
+ # Workflow Definition Id
16
+ class TemplateId
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,211 @@
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
+ # JSON payload that will be passed to the triggered workflow
16
+ class TriggerPayload
17
+ attr_accessor :instance_name
18
+
19
+ attr_accessor :metadata
20
+
21
+ attr_accessor :participants
22
+
23
+ attr_accessor :payload
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'instance_name' => :'instanceName',
29
+ :'metadata' => :'metadata',
30
+ :'participants' => :'participants',
31
+ :'payload' => :'payload'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.swagger_types
37
+ {
38
+ :'instance_name' => :'String',
39
+ :'metadata' => :'Object',
40
+ :'participants' => :'Object',
41
+ :'payload' => :'Object'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ return unless attributes.is_a?(Hash)
49
+
50
+ # convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
52
+
53
+ if attributes.has_key?(:'instanceName')
54
+ self.instance_name = attributes[:'instanceName']
55
+ end
56
+
57
+ if attributes.has_key?(:'metadata')
58
+ self.metadata = attributes[:'metadata']
59
+ end
60
+
61
+ if attributes.has_key?(:'participants')
62
+ self.participants = attributes[:'participants']
63
+ end
64
+
65
+ if attributes.has_key?(:'payload')
66
+ self.payload = attributes[:'payload']
67
+ end
68
+ end
69
+
70
+ # Show invalid properties with the reasons. Usually used together with valid?
71
+ # @return Array for valid properties with the reasons
72
+ def list_invalid_properties
73
+ invalid_properties = Array.new
74
+ invalid_properties
75
+ end
76
+
77
+ # Check to see if the all the properties in the model are valid
78
+ # @return true if the model is valid
79
+ def valid?
80
+ true
81
+ end
82
+
83
+ # Checks equality by comparing each attribute.
84
+ # @param [Object] Object to be compared
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ instance_name == o.instance_name &&
89
+ metadata == o.metadata &&
90
+ participants == o.participants &&
91
+ payload == o.payload
92
+ end
93
+
94
+ # @see the `==` method
95
+ # @param [Object] Object to be compared
96
+ def eql?(o)
97
+ self == o
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Fixnum] Hash code
102
+ def hash
103
+ [instance_name, metadata, participants, payload].hash
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ self.class.swagger_types.each_pair do |key, type|
112
+ if type =~ /\AArray<(.*)>/i
113
+ # check to ensure the input is an array given that the attribute
114
+ # is documented as an array but the input is not
115
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
116
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
117
+ end
118
+ elsif !attributes[self.class.attribute_map[key]].nil?
119
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
120
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
121
+ end
122
+
123
+ self
124
+ end
125
+
126
+ # Deserializes the data based on type
127
+ # @param string type Data type
128
+ # @param string value Value to be deserialized
129
+ # @return [Object] Deserialized data
130
+ def _deserialize(type, value)
131
+ case type.to_sym
132
+ when :DateTime
133
+ DateTime.parse(value)
134
+ when :Date
135
+ Date.parse(value)
136
+ when :String
137
+ value.to_s
138
+ when :Integer
139
+ value.to_i
140
+ when :Float
141
+ value.to_f
142
+ when :BOOLEAN
143
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
144
+ true
145
+ else
146
+ false
147
+ end
148
+ when :Object
149
+ # generic object (usually a Hash), return directly
150
+ value
151
+ when /\AArray<(?<inner_type>.+)>\z/
152
+ inner_type = Regexp.last_match[:inner_type]
153
+ value.map { |v| _deserialize(inner_type, v) }
154
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
155
+ k_type = Regexp.last_match[:k_type]
156
+ v_type = Regexp.last_match[:v_type]
157
+ {}.tap do |hash|
158
+ value.each do |k, v|
159
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
160
+ end
161
+ end
162
+ else # model
163
+ temp_model = DocuSign_Maestro.const_get(type).new
164
+ temp_model.build_from_hash(value)
165
+ end
166
+ end
167
+
168
+ # Returns the string representation of the object
169
+ # @return [String] String presentation of the object
170
+ def to_s
171
+ to_hash.to_s
172
+ end
173
+
174
+ # to_body is an alias to to_hash (backward compatibility)
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_body
177
+ to_hash
178
+ end
179
+
180
+ # Returns the object in the form of hash
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_hash
183
+ hash = {}
184
+ self.class.attribute_map.each_pair do |attr, param|
185
+ value = self.send(attr)
186
+ next if value.nil?
187
+ hash[param] = _to_hash(value)
188
+ end
189
+ hash
190
+ end
191
+
192
+ # Outputs non-array value in the form of hash
193
+ # For object, use to_hash. Otherwise, just return the value
194
+ # @param [Object] value Any valid value
195
+ # @return [Hash] Returns the value in the form of hash
196
+ def _to_hash(value)
197
+ if value.is_a?(Array)
198
+ value.compact.map { |v| _to_hash(v) }
199
+ elsif value.is_a?(Hash)
200
+ {}.tap do |hash|
201
+ value.each { |k, v| hash[k] = _to_hash(v) }
202
+ end
203
+ elsif value.respond_to? :to_hash
204
+ value.to_hash
205
+ else
206
+ value
207
+ end
208
+ end
209
+
210
+ end
211
+ end
@@ -0,0 +1,194 @@
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
+ # Trigger workflow via POST response details
16
+ class TriggerWorkflowViaPostResponse
17
+ attr_accessor :instance_id
18
+
19
+ # Instance specific url that can be used to be redirected to a workflow instance
20
+ attr_accessor :workflow_instance_url
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'instance_id' => :'instanceId',
26
+ :'workflow_instance_url' => :'workflowInstanceUrl'
27
+ }
28
+ end
29
+
30
+ # Attribute type mapping.
31
+ def self.swagger_types
32
+ {
33
+ :'instance_id' => :'String',
34
+ :'workflow_instance_url' => :'String'
35
+ }
36
+ end
37
+
38
+ # Initializes the object
39
+ # @param [Hash] attributes Model attributes in the form of hash
40
+ def initialize(attributes = {})
41
+ return unless attributes.is_a?(Hash)
42
+
43
+ # convert string to symbol for hash key
44
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
45
+
46
+ if attributes.has_key?(:'instanceId')
47
+ self.instance_id = attributes[:'instanceId']
48
+ end
49
+
50
+ if attributes.has_key?(:'workflowInstanceUrl')
51
+ self.workflow_instance_url = attributes[:'workflowInstanceUrl']
52
+ end
53
+ end
54
+
55
+ # Show invalid properties with the reasons. Usually used together with valid?
56
+ # @return Array for valid properties with the reasons
57
+ def list_invalid_properties
58
+ invalid_properties = Array.new
59
+ invalid_properties
60
+ end
61
+
62
+ # Check to see if the all the properties in the model are valid
63
+ # @return true if the model is valid
64
+ def valid?
65
+ true
66
+ end
67
+
68
+ # Checks equality by comparing each attribute.
69
+ # @param [Object] Object to be compared
70
+ def ==(o)
71
+ return true if self.equal?(o)
72
+ self.class == o.class &&
73
+ instance_id == o.instance_id &&
74
+ workflow_instance_url == o.workflow_instance_url
75
+ end
76
+
77
+ # @see the `==` method
78
+ # @param [Object] Object to be compared
79
+ def eql?(o)
80
+ self == o
81
+ end
82
+
83
+ # Calculates hash code according to all attributes.
84
+ # @return [Fixnum] Hash code
85
+ def hash
86
+ [instance_id, workflow_instance_url].hash
87
+ end
88
+
89
+ # Builds the object from hash
90
+ # @param [Hash] attributes Model attributes in the form of hash
91
+ # @return [Object] Returns the model itself
92
+ def build_from_hash(attributes)
93
+ return nil unless attributes.is_a?(Hash)
94
+ self.class.swagger_types.each_pair do |key, type|
95
+ if type =~ /\AArray<(.*)>/i
96
+ # check to ensure the input is an array given that the attribute
97
+ # is documented as an array but the input is not
98
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
99
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
100
+ end
101
+ elsif !attributes[self.class.attribute_map[key]].nil?
102
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
103
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
104
+ end
105
+
106
+ self
107
+ end
108
+
109
+ # Deserializes the data based on type
110
+ # @param string type Data type
111
+ # @param string value Value to be deserialized
112
+ # @return [Object] Deserialized data
113
+ def _deserialize(type, value)
114
+ case type.to_sym
115
+ when :DateTime
116
+ DateTime.parse(value)
117
+ when :Date
118
+ Date.parse(value)
119
+ when :String
120
+ value.to_s
121
+ when :Integer
122
+ value.to_i
123
+ when :Float
124
+ value.to_f
125
+ when :BOOLEAN
126
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
127
+ true
128
+ else
129
+ false
130
+ end
131
+ when :Object
132
+ # generic object (usually a Hash), return directly
133
+ value
134
+ when /\AArray<(?<inner_type>.+)>\z/
135
+ inner_type = Regexp.last_match[:inner_type]
136
+ value.map { |v| _deserialize(inner_type, v) }
137
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
138
+ k_type = Regexp.last_match[:k_type]
139
+ v_type = Regexp.last_match[:v_type]
140
+ {}.tap do |hash|
141
+ value.each do |k, v|
142
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
143
+ end
144
+ end
145
+ else # model
146
+ temp_model = DocuSign_Maestro.const_get(type).new
147
+ temp_model.build_from_hash(value)
148
+ end
149
+ end
150
+
151
+ # Returns the string representation of the object
152
+ # @return [String] String presentation of the object
153
+ def to_s
154
+ to_hash.to_s
155
+ end
156
+
157
+ # to_body is an alias to to_hash (backward compatibility)
158
+ # @return [Hash] Returns the object in the form of hash
159
+ def to_body
160
+ to_hash
161
+ end
162
+
163
+ # Returns the object in the form of hash
164
+ # @return [Hash] Returns the object in the form of hash
165
+ def to_hash
166
+ hash = {}
167
+ self.class.attribute_map.each_pair do |attr, param|
168
+ value = self.send(attr)
169
+ next if value.nil?
170
+ hash[param] = _to_hash(value)
171
+ end
172
+ hash
173
+ end
174
+
175
+ # Outputs non-array value in the form of hash
176
+ # For object, use to_hash. Otherwise, just return the value
177
+ # @param [Object] value Any valid value
178
+ # @return [Hash] Returns the value in the form of hash
179
+ def _to_hash(value)
180
+ if value.is_a?(Array)
181
+ value.compact.map { |v| _to_hash(v) }
182
+ elsif value.is_a?(Hash)
183
+ {}.tap do |hash|
184
+ value.each { |k, v| hash[k] = _to_hash(v) }
185
+ end
186
+ elsif value.respond_to? :to_hash
187
+ value.to_hash
188
+ else
189
+ value
190
+ end
191
+ end
192
+
193
+ end
194
+ end