ddx_interactions_api 0.1.0.pre.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +160 -0
  3. data/lib/ddx_interactions_api/api/authentication_details_api.rb +85 -0
  4. data/lib/ddx_interactions_api/api/interactions_api.rb +386 -0
  5. data/lib/ddx_interactions_api/api_client.rb +437 -0
  6. data/lib/ddx_interactions_api/api_error.rb +58 -0
  7. data/lib/ddx_interactions_api/configuration.rb +396 -0
  8. data/lib/ddx_interactions_api/models/accepted_interaction_dto.rb +226 -0
  9. data/lib/ddx_interactions_api/models/accepted_interactions_dto.rb +228 -0
  10. data/lib/ddx_interactions_api/models/activist_code.rb +252 -0
  11. data/lib/ddx_interactions_api/models/activist_code_outcome_details.rb +276 -0
  12. data/lib/ddx_interactions_api/models/address.rb +284 -0
  13. data/lib/ddx_interactions_api/models/address_channel_details.rb +269 -0
  14. data/lib/ddx_interactions_api/models/canvasser_details.rb +278 -0
  15. data/lib/ddx_interactions_api/models/committee_details.rb +278 -0
  16. data/lib/ddx_interactions_api/models/communication_consent.rb +243 -0
  17. data/lib/ddx_interactions_api/models/communication_consent_outcome_details.rb +276 -0
  18. data/lib/ddx_interactions_api/models/communication_consent_status.rb +40 -0
  19. data/lib/ddx_interactions_api/models/contact_info.rb +291 -0
  20. data/lib/ddx_interactions_api/models/contact_method.rb +53 -0
  21. data/lib/ddx_interactions_api/models/dynamic_channel_details.rb +238 -0
  22. data/lib/ddx_interactions_api/models/dynamic_outcome_details.rb +258 -0
  23. data/lib/ddx_interactions_api/models/event_details.rb +278 -0
  24. data/lib/ddx_interactions_api/models/event_role.rb +217 -0
  25. data/lib/ddx_interactions_api/models/event_signup.rb +253 -0
  26. data/lib/ddx_interactions_api/models/event_signup_outcome_details.rb +276 -0
  27. data/lib/ddx_interactions_api/models/event_signup_status.rb +255 -0
  28. data/lib/ddx_interactions_api/models/event_signup_status_value.rb +47 -0
  29. data/lib/ddx_interactions_api/models/exchange_interaction_status.rb +43 -0
  30. data/lib/ddx_interactions_api/models/exchange_interaction_status_dto.rb +278 -0
  31. data/lib/ddx_interactions_api/models/exchange_interaction_status_dto_cursor_paginated_response_dto.rb +237 -0
  32. data/lib/ddx_interactions_api/models/external_api_key_status.rb +40 -0
  33. data/lib/ddx_interactions_api/models/external_api_key_type.rb +39 -0
  34. data/lib/ddx_interactions_api/models/external_transaction_status.rb +45 -0
  35. data/lib/ddx_interactions_api/models/initiative_dto.rb +239 -0
  36. data/lib/ddx_interactions_api/models/interaction_dto.rb +513 -0
  37. data/lib/ddx_interactions_api/models/interaction_dto_channel.rb +56 -0
  38. data/lib/ddx_interactions_api/models/interaction_dto_outcomes_detailed_inner.rb +61 -0
  39. data/lib/ddx_interactions_api/models/interaction_error_dto.rb +223 -0
  40. data/lib/ddx_interactions_api/models/interaction_van_fields_dto.rb +227 -0
  41. data/lib/ddx_interactions_api/models/interactions_batch_result_dto.rb +244 -0
  42. data/lib/ddx_interactions_api/models/interactions_dto.rb +216 -0
  43. data/lib/ddx_interactions_api/models/interactions_external_api_transaction_dto.rb +279 -0
  44. data/lib/ddx_interactions_api/models/interactions_external_api_transaction_dto_get_response_dto.rb +225 -0
  45. data/lib/ddx_interactions_api/models/interactions_external_api_transaction_log_dto.rb +238 -0
  46. data/lib/ddx_interactions_api/models/mercury_destination_van_api_key_dto.rb +246 -0
  47. data/lib/ddx_interactions_api/models/minerva_metadata_dto.rb +215 -0
  48. data/lib/ddx_interactions_api/models/outcome.rb +58 -0
  49. data/lib/ddx_interactions_api/models/outcome_detail_operation.rb +41 -0
  50. data/lib/ddx_interactions_api/models/person_identifier.rb +278 -0
  51. data/lib/ddx_interactions_api/models/problem_details.rb +255 -0
  52. data/lib/ddx_interactions_api/models/rejected_interaction_dto.rb +238 -0
  53. data/lib/ddx_interactions_api/models/rejected_interactions_dto.rb +228 -0
  54. data/lib/ddx_interactions_api/models/simple_destination_dto.rb +243 -0
  55. data/lib/ddx_interactions_api/models/simple_movement_app_dto.rb +237 -0
  56. data/lib/ddx_interactions_api/models/simple_workspace_dto.rb +277 -0
  57. data/lib/ddx_interactions_api/models/survey_response.rb +299 -0
  58. data/lib/ddx_interactions_api/models/survey_response_outcome_details.rb +276 -0
  59. data/lib/ddx_interactions_api/models/van_api_key_dto.rb +319 -0
  60. data/lib/ddx_interactions_api/models/van_database_mode.rb +40 -0
  61. data/lib/ddx_interactions_api/models/who_am_i_api_key_dto.rb +286 -0
  62. data/lib/ddx_interactions_api/models/workspace_type_dto.rb +40 -0
  63. data/lib/ddx_interactions_api/version.rb +15 -0
  64. data/lib/ddx_interactions_api.rb +96 -0
  65. metadata +175 -0
@@ -0,0 +1,278 @@
1
+ =begin
2
+ #Interactions API
3
+
4
+ #Interactions API documentation
5
+
6
+ The version of the OpenAPI document: v1
7
+ Contact: api@demexchange.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DdxInteractionsApi
17
+ # Represents details for the entities that conducted or logged the outreach attempt.
18
+ class CommitteeDetails
19
+ # Type of the committee identifier specified in 'id', representing the source context of the interaction.
20
+ attr_accessor :type
21
+
22
+ # The actual committee identifier itself.
23
+ attr_accessor :id
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'type' => :'type',
29
+ :'id' => :'id'
30
+ }
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'type' => :'String',
42
+ :'id' => :'String'
43
+ }
44
+ end
45
+
46
+ # List of attributes with nullable: true
47
+ def self.openapi_nullable
48
+ Set.new([
49
+ ])
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ if (!attributes.is_a?(Hash))
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DdxInteractionsApi::CommitteeDetails` initialize method"
57
+ end
58
+
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DdxInteractionsApi::CommitteeDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'type')
68
+ self.type = attributes[:'type']
69
+ else
70
+ self.type = nil
71
+ end
72
+
73
+ if attributes.key?(:'id')
74
+ self.id = attributes[:'id']
75
+ else
76
+ self.id = nil
77
+ end
78
+ end
79
+
80
+ # Show invalid properties with the reasons. Usually used together with valid?
81
+ # @return Array for valid properties with the reasons
82
+ def list_invalid_properties
83
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
84
+ invalid_properties = Array.new
85
+ if @type.nil?
86
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
87
+ end
88
+
89
+ if @type.to_s.length < 1
90
+ invalid_properties.push('invalid value for "type", the character length must be great than or equal to 1.')
91
+ end
92
+
93
+ if @id.nil?
94
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
95
+ end
96
+
97
+ if @id.to_s.length < 1
98
+ invalid_properties.push('invalid value for "id", the character length must be great than or equal to 1.')
99
+ end
100
+
101
+ invalid_properties
102
+ end
103
+
104
+ # Check to see if the all the properties in the model are valid
105
+ # @return true if the model is valid
106
+ def valid?
107
+ warn '[DEPRECATED] the `valid?` method is obsolete'
108
+ return false if @type.nil?
109
+ return false if @type.to_s.length < 1
110
+ return false if @id.nil?
111
+ return false if @id.to_s.length < 1
112
+ true
113
+ end
114
+
115
+ # Custom attribute writer method with validation
116
+ # @param [Object] type Value to be assigned
117
+ def type=(type)
118
+ if type.nil?
119
+ fail ArgumentError, 'type cannot be nil'
120
+ end
121
+
122
+ if type.to_s.length < 1
123
+ fail ArgumentError, 'invalid value for "type", the character length must be great than or equal to 1.'
124
+ end
125
+
126
+ @type = type
127
+ end
128
+
129
+ # Custom attribute writer method with validation
130
+ # @param [Object] id Value to be assigned
131
+ def id=(id)
132
+ if id.nil?
133
+ fail ArgumentError, 'id cannot be nil'
134
+ end
135
+
136
+ if id.to_s.length < 1
137
+ fail ArgumentError, 'invalid value for "id", the character length must be great than or equal to 1.'
138
+ end
139
+
140
+ @id = id
141
+ end
142
+
143
+ # Checks equality by comparing each attribute.
144
+ # @param [Object] Object to be compared
145
+ def ==(o)
146
+ return true if self.equal?(o)
147
+ self.class == o.class &&
148
+ type == o.type &&
149
+ id == o.id
150
+ end
151
+
152
+ # @see the `==` method
153
+ # @param [Object] Object to be compared
154
+ def eql?(o)
155
+ self == o
156
+ end
157
+
158
+ # Calculates hash code according to all attributes.
159
+ # @return [Integer] Hash code
160
+ def hash
161
+ [type, id].hash
162
+ end
163
+
164
+ # Builds the object from hash
165
+ # @param [Hash] attributes Model attributes in the form of hash
166
+ # @return [Object] Returns the model itself
167
+ def self.build_from_hash(attributes)
168
+ return nil unless attributes.is_a?(Hash)
169
+ attributes = attributes.transform_keys(&:to_sym)
170
+ transformed_hash = {}
171
+ openapi_types.each_pair do |key, type|
172
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
173
+ transformed_hash["#{key}"] = nil
174
+ elsif type =~ /\AArray<(.*)>/i
175
+ # check to ensure the input is an array given that the attribute
176
+ # is documented as an array but the input is not
177
+ if attributes[attribute_map[key]].is_a?(Array)
178
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
179
+ end
180
+ elsif !attributes[attribute_map[key]].nil?
181
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
182
+ end
183
+ end
184
+ new(transformed_hash)
185
+ end
186
+
187
+ # Deserializes the data based on type
188
+ # @param string type Data type
189
+ # @param string value Value to be deserialized
190
+ # @return [Object] Deserialized data
191
+ def self._deserialize(type, value)
192
+ case type.to_sym
193
+ when :Time
194
+ Time.parse(value)
195
+ when :Date
196
+ Date.parse(value)
197
+ when :String
198
+ value.to_s
199
+ when :Integer
200
+ value.to_i
201
+ when :Float
202
+ value.to_f
203
+ when :Boolean
204
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
205
+ true
206
+ else
207
+ false
208
+ end
209
+ when :Object
210
+ # generic object (usually a Hash), return directly
211
+ value
212
+ when /\AArray<(?<inner_type>.+)>\z/
213
+ inner_type = Regexp.last_match[:inner_type]
214
+ value.map { |v| _deserialize(inner_type, v) }
215
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
216
+ k_type = Regexp.last_match[:k_type]
217
+ v_type = Regexp.last_match[:v_type]
218
+ {}.tap do |hash|
219
+ value.each do |k, v|
220
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
221
+ end
222
+ end
223
+ else # model
224
+ # models (e.g. Pet) or oneOf
225
+ klass = DdxInteractionsApi.const_get(type)
226
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
227
+ end
228
+ end
229
+
230
+ # Returns the string representation of the object
231
+ # @return [String] String presentation of the object
232
+ def to_s
233
+ to_hash.to_s
234
+ end
235
+
236
+ # to_body is an alias to to_hash (backward compatibility)
237
+ # @return [Hash] Returns the object in the form of hash
238
+ def to_body
239
+ to_hash
240
+ end
241
+
242
+ # Returns the object in the form of hash
243
+ # @return [Hash] Returns the object in the form of hash
244
+ def to_hash
245
+ hash = {}
246
+ self.class.attribute_map.each_pair do |attr, param|
247
+ value = self.send(attr)
248
+ if value.nil?
249
+ is_nullable = self.class.openapi_nullable.include?(attr)
250
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
251
+ end
252
+
253
+ hash[param] = _to_hash(value)
254
+ end
255
+ hash
256
+ end
257
+
258
+ # Outputs non-array value in the form of hash
259
+ # For object, use to_hash. Otherwise, just return the value
260
+ # @param [Object] value Any valid value
261
+ # @return [Hash] Returns the value in the form of hash
262
+ def _to_hash(value)
263
+ if value.is_a?(Array)
264
+ value.compact.map { |v| _to_hash(v) }
265
+ elsif value.is_a?(Hash)
266
+ {}.tap do |hash|
267
+ value.each { |k, v| hash[k] = _to_hash(v) }
268
+ end
269
+ elsif value.respond_to? :to_hash
270
+ value.to_hash
271
+ else
272
+ value
273
+ end
274
+ end
275
+
276
+ end
277
+
278
+ end
@@ -0,0 +1,243 @@
1
+ =begin
2
+ #Interactions API
3
+
4
+ #Interactions API documentation
5
+
6
+ The version of the OpenAPI document: v1
7
+ Contact: api@demexchange.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.10.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DdxInteractionsApi
17
+ class CommunicationConsent
18
+ attr_accessor :consent_status
19
+
20
+ class EnumAttributeValidator
21
+ attr_reader :datatype
22
+ attr_reader :allowable_values
23
+
24
+ def initialize(datatype, allowable_values)
25
+ @allowable_values = allowable_values.map do |value|
26
+ case datatype.to_s
27
+ when /Integer/i
28
+ value.to_i
29
+ when /Float/i
30
+ value.to_f
31
+ else
32
+ value
33
+ end
34
+ end
35
+ end
36
+
37
+ def valid?(value)
38
+ !value || allowable_values.include?(value)
39
+ end
40
+ end
41
+
42
+ # Attribute mapping from ruby-style variable name to JSON key.
43
+ def self.attribute_map
44
+ {
45
+ :'consent_status' => :'consentStatus'
46
+ }
47
+ end
48
+
49
+ # Returns all the JSON keys this model knows about
50
+ def self.acceptable_attributes
51
+ attribute_map.values
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.openapi_types
56
+ {
57
+ :'consent_status' => :'CommunicationConsentStatus'
58
+ }
59
+ end
60
+
61
+ # List of attributes with nullable: true
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ ])
65
+ end
66
+
67
+ # Initializes the object
68
+ # @param [Hash] attributes Model attributes in the form of hash
69
+ def initialize(attributes = {})
70
+ if (!attributes.is_a?(Hash))
71
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DdxInteractionsApi::CommunicationConsent` initialize method"
72
+ end
73
+
74
+ # check to see if the attribute exists and convert string to symbol for hash key
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!self.class.attribute_map.key?(k.to_sym))
77
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DdxInteractionsApi::CommunicationConsent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
78
+ end
79
+ h[k.to_sym] = v
80
+ }
81
+
82
+ if attributes.key?(:'consent_status')
83
+ self.consent_status = attributes[:'consent_status']
84
+ else
85
+ self.consent_status = nil
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
93
+ invalid_properties = Array.new
94
+ if @consent_status.nil?
95
+ invalid_properties.push('invalid value for "consent_status", consent_status cannot be nil.')
96
+ end
97
+
98
+ invalid_properties
99
+ end
100
+
101
+ # Check to see if the all the properties in the model are valid
102
+ # @return true if the model is valid
103
+ def valid?
104
+ warn '[DEPRECATED] the `valid?` method is obsolete'
105
+ return false if @consent_status.nil?
106
+ true
107
+ end
108
+
109
+ # Checks equality by comparing each attribute.
110
+ # @param [Object] Object to be compared
111
+ def ==(o)
112
+ return true if self.equal?(o)
113
+ self.class == o.class &&
114
+ consent_status == o.consent_status
115
+ end
116
+
117
+ # @see the `==` method
118
+ # @param [Object] Object to be compared
119
+ def eql?(o)
120
+ self == o
121
+ end
122
+
123
+ # Calculates hash code according to all attributes.
124
+ # @return [Integer] Hash code
125
+ def hash
126
+ [consent_status].hash
127
+ end
128
+
129
+ # Builds the object from hash
130
+ # @param [Hash] attributes Model attributes in the form of hash
131
+ # @return [Object] Returns the model itself
132
+ def self.build_from_hash(attributes)
133
+ return nil unless attributes.is_a?(Hash)
134
+ attributes = attributes.transform_keys(&:to_sym)
135
+ transformed_hash = {}
136
+ openapi_types.each_pair do |key, type|
137
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
138
+ transformed_hash["#{key}"] = nil
139
+ elsif type =~ /\AArray<(.*)>/i
140
+ # check to ensure the input is an array given that the attribute
141
+ # is documented as an array but the input is not
142
+ if attributes[attribute_map[key]].is_a?(Array)
143
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
144
+ end
145
+ elsif !attributes[attribute_map[key]].nil?
146
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
147
+ end
148
+ end
149
+ new(transformed_hash)
150
+ end
151
+
152
+ # Deserializes the data based on type
153
+ # @param string type Data type
154
+ # @param string value Value to be deserialized
155
+ # @return [Object] Deserialized data
156
+ def self._deserialize(type, value)
157
+ case type.to_sym
158
+ when :Time
159
+ Time.parse(value)
160
+ when :Date
161
+ Date.parse(value)
162
+ when :String
163
+ value.to_s
164
+ when :Integer
165
+ value.to_i
166
+ when :Float
167
+ value.to_f
168
+ when :Boolean
169
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
170
+ true
171
+ else
172
+ false
173
+ end
174
+ when :Object
175
+ # generic object (usually a Hash), return directly
176
+ value
177
+ when /\AArray<(?<inner_type>.+)>\z/
178
+ inner_type = Regexp.last_match[:inner_type]
179
+ value.map { |v| _deserialize(inner_type, v) }
180
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
181
+ k_type = Regexp.last_match[:k_type]
182
+ v_type = Regexp.last_match[:v_type]
183
+ {}.tap do |hash|
184
+ value.each do |k, v|
185
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
186
+ end
187
+ end
188
+ else # model
189
+ # models (e.g. Pet) or oneOf
190
+ klass = DdxInteractionsApi.const_get(type)
191
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
192
+ end
193
+ end
194
+
195
+ # Returns the string representation of the object
196
+ # @return [String] String presentation of the object
197
+ def to_s
198
+ to_hash.to_s
199
+ end
200
+
201
+ # to_body is an alias to to_hash (backward compatibility)
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_body
204
+ to_hash
205
+ end
206
+
207
+ # Returns the object in the form of hash
208
+ # @return [Hash] Returns the object in the form of hash
209
+ def to_hash
210
+ hash = {}
211
+ self.class.attribute_map.each_pair do |attr, param|
212
+ value = self.send(attr)
213
+ if value.nil?
214
+ is_nullable = self.class.openapi_nullable.include?(attr)
215
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
216
+ end
217
+
218
+ hash[param] = _to_hash(value)
219
+ end
220
+ hash
221
+ end
222
+
223
+ # Outputs non-array value in the form of hash
224
+ # For object, use to_hash. Otherwise, just return the value
225
+ # @param [Object] value Any valid value
226
+ # @return [Hash] Returns the value in the form of hash
227
+ def _to_hash(value)
228
+ if value.is_a?(Array)
229
+ value.compact.map { |v| _to_hash(v) }
230
+ elsif value.is_a?(Hash)
231
+ {}.tap do |hash|
232
+ value.each { |k, v| hash[k] = _to_hash(v) }
233
+ end
234
+ elsif value.respond_to? :to_hash
235
+ value.to_hash
236
+ else
237
+ value
238
+ end
239
+ end
240
+
241
+ end
242
+
243
+ end