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,238 @@
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 a generic Channel Details object; does not have any validation rules or JSON format limitations except where noted below.
18
+ class DynamicChannelDetails
19
+ # Optional; unique identifier for any known id for the channel `type`
20
+ attr_accessor :id
21
+
22
+ # Type of the channel specified in 'value'. Required when Channel is provided. Recognized types: - \"phone_number\": Indicates `value` is a phone number; `value` must be in E.164 format (e.g., +14155552671). - \"email\": Indicates `value` is an email address. - [any other identifier]: Any type not listed above. `value` can be a string, an int or an arbitrary object.
23
+ attr_accessor :type
24
+
25
+ # The actual channel used during the outreach attempt. This field can be provided as a string or int though only the object form is shown here. Examples: +14155552671, name@org.org, @handle. Required when Channel is provided.
26
+ attr_accessor :value
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'id' => :'id',
32
+ :'type' => :'type',
33
+ :'value' => :'value'
34
+ }
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'id' => :'String',
46
+ :'type' => :'String',
47
+ :'value' => :'Object'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ :'id',
55
+ :'value'
56
+ ])
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param [Hash] attributes Model attributes in the form of hash
61
+ def initialize(attributes = {})
62
+ if (!attributes.is_a?(Hash))
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DdxInteractionsApi::DynamicChannelDetails` initialize method"
64
+ end
65
+
66
+ # check to see if the attribute exists and convert string to symbol for hash key
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!self.class.attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DdxInteractionsApi::DynamicChannelDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'id')
75
+ self.id = attributes[:'id']
76
+ end
77
+
78
+ if attributes.key?(:'type')
79
+ self.type = attributes[:'type']
80
+ end
81
+
82
+ if attributes.key?(:'value')
83
+ self.value = attributes[:'value']
84
+ end
85
+ end
86
+
87
+ # Show invalid properties with the reasons. Usually used together with valid?
88
+ # @return Array for valid properties with the reasons
89
+ def list_invalid_properties
90
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
91
+ invalid_properties = Array.new
92
+ invalid_properties
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ def valid?
98
+ warn '[DEPRECATED] the `valid?` method is obsolete'
99
+ true
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param [Object] Object to be compared
104
+ def ==(o)
105
+ return true if self.equal?(o)
106
+ self.class == o.class &&
107
+ id == o.id &&
108
+ type == o.type &&
109
+ value == o.value
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [id, type, value].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
134
+ elsif type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
+ end
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
+ end
143
+ end
144
+ new(transformed_hash)
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 self._deserialize(type, value)
152
+ case type.to_sym
153
+ when :Time
154
+ Time.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
+ # models (e.g. Pet) or oneOf
185
+ klass = DdxInteractionsApi.const_get(type)
186
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
187
+ end
188
+ end
189
+
190
+ # Returns the string representation of the object
191
+ # @return [String] String presentation of the object
192
+ def to_s
193
+ to_hash.to_s
194
+ end
195
+
196
+ # to_body is an alias to to_hash (backward compatibility)
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_body
199
+ to_hash
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ if value.nil?
209
+ is_nullable = self.class.openapi_nullable.include?(attr)
210
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
211
+ end
212
+
213
+ hash[param] = _to_hash(value)
214
+ end
215
+ hash
216
+ end
217
+
218
+ # Outputs non-array value in the form of hash
219
+ # For object, use to_hash. Otherwise, just return the value
220
+ # @param [Object] value Any valid value
221
+ # @return [Hash] Returns the value in the form of hash
222
+ def _to_hash(value)
223
+ if value.is_a?(Array)
224
+ value.compact.map { |v| _to_hash(v) }
225
+ elsif value.is_a?(Hash)
226
+ {}.tap do |hash|
227
+ value.each { |k, v| hash[k] = _to_hash(v) }
228
+ end
229
+ elsif value.respond_to? :to_hash
230
+ value.to_hash
231
+ else
232
+ value
233
+ end
234
+ end
235
+
236
+ end
237
+
238
+ end
@@ -0,0 +1,258 @@
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 a generic Outcome Details object; does not have any validation rules or JSON format limitations
18
+ class DynamicOutcomeDetails
19
+ attr_accessor :operation
20
+
21
+ # This field categorizes the type of detailed outcome information being provided.
22
+ attr_accessor :type
23
+
24
+ # Provide additional details of the outreach attempt. This field can be provided as a string or int though only the object form is shown here.
25
+ attr_accessor :value
26
+
27
+ class EnumAttributeValidator
28
+ attr_reader :datatype
29
+ attr_reader :allowable_values
30
+
31
+ def initialize(datatype, allowable_values)
32
+ @allowable_values = allowable_values.map do |value|
33
+ case datatype.to_s
34
+ when /Integer/i
35
+ value.to_i
36
+ when /Float/i
37
+ value.to_f
38
+ else
39
+ value
40
+ end
41
+ end
42
+ end
43
+
44
+ def valid?(value)
45
+ !value || allowable_values.include?(value)
46
+ end
47
+ end
48
+
49
+ # Attribute mapping from ruby-style variable name to JSON key.
50
+ def self.attribute_map
51
+ {
52
+ :'operation' => :'operation',
53
+ :'type' => :'type',
54
+ :'value' => :'value'
55
+ }
56
+ end
57
+
58
+ # Returns all the JSON keys this model knows about
59
+ def self.acceptable_attributes
60
+ attribute_map.values
61
+ end
62
+
63
+ # Attribute type mapping.
64
+ def self.openapi_types
65
+ {
66
+ :'operation' => :'OutcomeDetailOperation',
67
+ :'type' => :'String',
68
+ :'value' => :'Object'
69
+ }
70
+ end
71
+
72
+ # List of attributes with nullable: true
73
+ def self.openapi_nullable
74
+ Set.new([
75
+ :'value'
76
+ ])
77
+ end
78
+
79
+ # Initializes the object
80
+ # @param [Hash] attributes Model attributes in the form of hash
81
+ def initialize(attributes = {})
82
+ if (!attributes.is_a?(Hash))
83
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DdxInteractionsApi::DynamicOutcomeDetails` initialize method"
84
+ end
85
+
86
+ # check to see if the attribute exists and convert string to symbol for hash key
87
+ attributes = attributes.each_with_object({}) { |(k, v), h|
88
+ if (!self.class.attribute_map.key?(k.to_sym))
89
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DdxInteractionsApi::DynamicOutcomeDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
90
+ end
91
+ h[k.to_sym] = v
92
+ }
93
+
94
+ if attributes.key?(:'operation')
95
+ self.operation = attributes[:'operation']
96
+ end
97
+
98
+ if attributes.key?(:'type')
99
+ self.type = attributes[:'type']
100
+ end
101
+
102
+ if attributes.key?(:'value')
103
+ self.value = attributes[:'value']
104
+ end
105
+ end
106
+
107
+ # Show invalid properties with the reasons. Usually used together with valid?
108
+ # @return Array for valid properties with the reasons
109
+ def list_invalid_properties
110
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
111
+ invalid_properties = Array.new
112
+ invalid_properties
113
+ end
114
+
115
+ # Check to see if the all the properties in the model are valid
116
+ # @return true if the model is valid
117
+ def valid?
118
+ warn '[DEPRECATED] the `valid?` method is obsolete'
119
+ true
120
+ end
121
+
122
+ # Checks equality by comparing each attribute.
123
+ # @param [Object] Object to be compared
124
+ def ==(o)
125
+ return true if self.equal?(o)
126
+ self.class == o.class &&
127
+ operation == o.operation &&
128
+ type == o.type &&
129
+ value == o.value
130
+ end
131
+
132
+ # @see the `==` method
133
+ # @param [Object] Object to be compared
134
+ def eql?(o)
135
+ self == o
136
+ end
137
+
138
+ # Calculates hash code according to all attributes.
139
+ # @return [Integer] Hash code
140
+ def hash
141
+ [operation, type, value].hash
142
+ end
143
+
144
+ # Builds the object from hash
145
+ # @param [Hash] attributes Model attributes in the form of hash
146
+ # @return [Object] Returns the model itself
147
+ def self.build_from_hash(attributes)
148
+ return nil unless attributes.is_a?(Hash)
149
+ attributes = attributes.transform_keys(&:to_sym)
150
+ transformed_hash = {}
151
+ openapi_types.each_pair do |key, type|
152
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
153
+ transformed_hash["#{key}"] = nil
154
+ elsif type =~ /\AArray<(.*)>/i
155
+ # check to ensure the input is an array given that the attribute
156
+ # is documented as an array but the input is not
157
+ if attributes[attribute_map[key]].is_a?(Array)
158
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
159
+ end
160
+ elsif !attributes[attribute_map[key]].nil?
161
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
162
+ end
163
+ end
164
+ new(transformed_hash)
165
+ end
166
+
167
+ # Deserializes the data based on type
168
+ # @param string type Data type
169
+ # @param string value Value to be deserialized
170
+ # @return [Object] Deserialized data
171
+ def self._deserialize(type, value)
172
+ case type.to_sym
173
+ when :Time
174
+ Time.parse(value)
175
+ when :Date
176
+ Date.parse(value)
177
+ when :String
178
+ value.to_s
179
+ when :Integer
180
+ value.to_i
181
+ when :Float
182
+ value.to_f
183
+ when :Boolean
184
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
185
+ true
186
+ else
187
+ false
188
+ end
189
+ when :Object
190
+ # generic object (usually a Hash), return directly
191
+ value
192
+ when /\AArray<(?<inner_type>.+)>\z/
193
+ inner_type = Regexp.last_match[:inner_type]
194
+ value.map { |v| _deserialize(inner_type, v) }
195
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
196
+ k_type = Regexp.last_match[:k_type]
197
+ v_type = Regexp.last_match[:v_type]
198
+ {}.tap do |hash|
199
+ value.each do |k, v|
200
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
201
+ end
202
+ end
203
+ else # model
204
+ # models (e.g. Pet) or oneOf
205
+ klass = DdxInteractionsApi.const_get(type)
206
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
207
+ end
208
+ end
209
+
210
+ # Returns the string representation of the object
211
+ # @return [String] String presentation of the object
212
+ def to_s
213
+ to_hash.to_s
214
+ end
215
+
216
+ # to_body is an alias to to_hash (backward compatibility)
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_body
219
+ to_hash
220
+ end
221
+
222
+ # Returns the object in the form of hash
223
+ # @return [Hash] Returns the object in the form of hash
224
+ def to_hash
225
+ hash = {}
226
+ self.class.attribute_map.each_pair do |attr, param|
227
+ value = self.send(attr)
228
+ if value.nil?
229
+ is_nullable = self.class.openapi_nullable.include?(attr)
230
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
231
+ end
232
+
233
+ hash[param] = _to_hash(value)
234
+ end
235
+ hash
236
+ end
237
+
238
+ # Outputs non-array value in the form of hash
239
+ # For object, use to_hash. Otherwise, just return the value
240
+ # @param [Object] value Any valid value
241
+ # @return [Hash] Returns the value in the form of hash
242
+ def _to_hash(value)
243
+ if value.is_a?(Array)
244
+ value.compact.map { |v| _to_hash(v) }
245
+ elsif value.is_a?(Hash)
246
+ {}.tap do |hash|
247
+ value.each { |k, v| hash[k] = _to_hash(v) }
248
+ end
249
+ elsif value.respond_to? :to_hash
250
+ value.to_hash
251
+ else
252
+ value
253
+ end
254
+ end
255
+
256
+ end
257
+
258
+ end