appnigma-sdk 2.0.0 → 2.2.0

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 (168) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +14 -0
  3. data/README.md +592 -26
  4. data/exe/appnigma +8 -0
  5. data/lib/appnigma/actions.rb +33 -0
  6. data/lib/appnigma/checks.rb +13 -0
  7. data/lib/appnigma/client.rb +30 -13
  8. data/lib/appnigma/command.rb +154 -0
  9. data/lib/appnigma/command_files.rb +46 -0
  10. data/lib/appnigma/connect_fields.rb +83 -0
  11. data/lib/appnigma/connections.rb +72 -3
  12. data/lib/appnigma/constants.rb +57 -0
  13. data/lib/appnigma/end_customers.rb +29 -0
  14. data/lib/appnigma/errors.rb +44 -6
  15. data/lib/appnigma/features.rb +19 -0
  16. data/lib/appnigma/files.rb +26 -0
  17. data/lib/appnigma/generated/api/default_api.rb +2149 -380
  18. data/lib/appnigma/generated/api_client.rb +1 -1
  19. data/lib/appnigma/generated/api_error.rb +1 -1
  20. data/lib/appnigma/generated/api_model_base.rb +1 -1
  21. data/lib/appnigma/generated/configuration.rb +1 -1
  22. data/lib/appnigma/generated/models/action_entry.rb +1 -1
  23. data/lib/appnigma/generated/models/check_logic_input.rb +276 -0
  24. data/lib/appnigma/generated/models/check_logic_output.rb +193 -0
  25. data/lib/appnigma/generated/models/client_event.rb +309 -0
  26. data/lib/appnigma/generated/models/client_event_delivery.rb +306 -0
  27. data/lib/appnigma/generated/models/client_event_type.rb +44 -0
  28. data/lib/appnigma/generated/models/client_webhook.rb +346 -0
  29. data/lib/appnigma/generated/models/connect_end_customer_input.rb +243 -0
  30. data/lib/appnigma/generated/models/connect_end_customer_output.rb +294 -0
  31. data/lib/appnigma/generated/models/connect_field.rb +308 -0
  32. data/lib/appnigma/generated/models/connection_status.rb +1 -1
  33. data/lib/appnigma/generated/models/create_connection_link_input.rb +1 -1
  34. data/lib/appnigma/generated/models/create_connection_link_output.rb +1 -1
  35. data/lib/appnigma/generated/models/create_logic_input.rb +273 -0
  36. data/lib/appnigma/generated/models/create_logic_input_trigger.rb +104 -0
  37. data/lib/appnigma/generated/models/create_logic_input_trigger_any_of.rb +257 -0
  38. data/lib/appnigma/generated/models/create_logic_input_trigger_any_of1.rb +238 -0
  39. data/lib/appnigma/generated/models/create_logic_output.rb +230 -0
  40. data/lib/appnigma/generated/models/create_portal_link_input.rb +2 -18
  41. data/lib/appnigma/generated/models/create_portal_link_output.rb +1 -1
  42. data/lib/appnigma/generated/models/create_webhook_input.rb +187 -0
  43. data/lib/appnigma/generated/models/create_webhook_output.rb +204 -0
  44. data/lib/appnigma/generated/models/crm_company.rb +1 -1
  45. data/lib/appnigma/generated/models/crm_company_get_output.rb +1 -1
  46. data/lib/appnigma/generated/models/crm_company_list_output.rb +1 -1
  47. data/lib/appnigma/generated/models/crm_company_write_output.rb +1 -1
  48. data/lib/appnigma/generated/models/crm_contact.rb +1 -1
  49. data/lib/appnigma/generated/models/crm_contact_get_output.rb +1 -1
  50. data/lib/appnigma/generated/models/crm_contact_list_output.rb +1 -1
  51. data/lib/appnigma/generated/models/crm_contact_write_output.rb +1 -1
  52. data/lib/appnigma/generated/models/crm_create_input.rb +1 -1
  53. data/lib/appnigma/generated/models/crm_custom_field.rb +1 -1
  54. data/lib/appnigma/generated/models/crm_deal.rb +1 -1
  55. data/lib/appnigma/generated/models/crm_deal_create_input.rb +1 -1
  56. data/lib/appnigma/generated/models/crm_deal_get_output.rb +1 -1
  57. data/lib/appnigma/generated/models/crm_deal_list_output.rb +1 -1
  58. data/lib/appnigma/generated/models/crm_deal_write_output.rb +1 -1
  59. data/lib/appnigma/generated/models/crm_email.rb +1 -1
  60. data/lib/appnigma/generated/models/crm_get_input.rb +1 -1
  61. data/lib/appnigma/generated/models/crm_labelled.rb +1 -1
  62. data/lib/appnigma/generated/models/crm_list_input.rb +1 -1
  63. data/lib/appnigma/generated/models/crm_phone.rb +1 -1
  64. data/lib/appnigma/generated/models/crm_update_input.rb +1 -1
  65. data/lib/appnigma/generated/models/delete_end_customer_input.rb +178 -0
  66. data/lib/appnigma/generated/models/delete_end_customer_output.rb +286 -0
  67. data/lib/appnigma/generated/models/delete_end_customer_output_connections_inner.rb +238 -0
  68. data/lib/appnigma/generated/models/delete_end_customer_output_logic_folder.rb +255 -0
  69. data/lib/appnigma/generated/models/delete_end_customer_output_steps_inner.rb +257 -0
  70. data/lib/appnigma/generated/models/delete_webhook_input.rb +189 -0
  71. data/lib/appnigma/generated/models/delete_webhook_output.rb +228 -0
  72. data/lib/appnigma/generated/models/discard_logic_input.rb +292 -0
  73. data/lib/appnigma/generated/models/discard_logic_output.rb +254 -0
  74. data/lib/appnigma/generated/models/disconnect_connection_input.rb +216 -0
  75. data/lib/appnigma/generated/models/disconnect_connection_output.rb +294 -0
  76. data/lib/appnigma/generated/models/edit_logic_input.rb +368 -0
  77. data/lib/appnigma/generated/models/edit_logic_output.rb +298 -0
  78. data/lib/appnigma/generated/models/encrypted_fields.rb +357 -0
  79. data/lib/appnigma/generated/models/end_customer.rb +17 -3
  80. data/lib/appnigma/generated/models/end_customer_connection.rb +1 -1
  81. data/lib/appnigma/generated/models/function_entry.rb +1 -1
  82. data/lib/appnigma/generated/models/function_owner.rb +1 -1
  83. data/lib/appnigma/generated/models/function_owner_one_of.rb +1 -1
  84. data/lib/appnigma/generated/models/function_owner_one_of1.rb +1 -1
  85. data/lib/appnigma/generated/models/get_alerts_output.rb +180 -0
  86. data/lib/appnigma/generated/models/get_connect_key_output.rb +256 -0
  87. data/lib/appnigma/generated/models/get_connection_input.rb +1 -1
  88. data/lib/appnigma/generated/models/get_connection_output.rb +34 -7
  89. data/lib/appnigma/generated/models/get_guide_output.rb +1 -1
  90. data/lib/appnigma/generated/models/get_logic_go_live_status_input.rb +247 -0
  91. data/lib/appnigma/generated/models/get_logic_go_live_status_output.rb +296 -0
  92. data/lib/appnigma/generated/models/get_logic_input.rb +247 -0
  93. data/lib/appnigma/generated/models/get_logic_output.rb +240 -0
  94. data/lib/appnigma/generated/models/get_logic_output_file.rb +204 -0
  95. data/lib/appnigma/generated/models/get_platform_input.rb +188 -0
  96. data/lib/appnigma/generated/models/get_platform_output.rb +326 -0
  97. data/lib/appnigma/generated/models/get_sync_output.rb +207 -0
  98. data/lib/appnigma/generated/models/go_live_logic_input.rb +316 -0
  99. data/lib/appnigma/generated/models/go_live_logic_output.rb +281 -0
  100. data/lib/appnigma/generated/models/json_value.rb +1 -1
  101. data/lib/appnigma/generated/models/list_actions_output.rb +1 -1
  102. data/lib/appnigma/generated/models/list_connections_output.rb +3 -3
  103. data/lib/appnigma/generated/models/list_events_input.rb +302 -0
  104. data/lib/appnigma/generated/models/list_events_output.rb +193 -0
  105. data/lib/appnigma/generated/models/list_features_output.rb +179 -0
  106. data/lib/appnigma/generated/models/list_features_output_features_inner.rb +229 -0
  107. data/lib/appnigma/generated/models/list_functions_output.rb +1 -1
  108. data/lib/appnigma/generated/models/list_logic_input.rb +162 -0
  109. data/lib/appnigma/generated/models/list_logic_output.rb +209 -0
  110. data/lib/appnigma/generated/models/list_logic_runs_input.rb +275 -0
  111. data/lib/appnigma/generated/models/list_logic_runs_output.rb +193 -0
  112. data/lib/appnigma/generated/models/list_platforms_output.rb +1 -1
  113. data/lib/appnigma/generated/models/list_record_changes_input.rb +375 -0
  114. data/lib/appnigma/generated/models/list_record_changes_output.rb +193 -0
  115. data/lib/appnigma/generated/models/list_webhooks_output.rb +180 -0
  116. data/lib/appnigma/generated/models/logic_check_problem.rb +203 -0
  117. data/lib/appnigma/generated/models/logic_conditional.rb +3 -3
  118. data/lib/appnigma/generated/models/logic_draft.rb +257 -0
  119. data/lib/appnigma/generated/models/logic_entry.rb +441 -0
  120. data/lib/appnigma/generated/models/logic_entry_failure.rb +205 -0
  121. data/lib/appnigma/generated/models/logic_folder_problem.rb +218 -0
  122. data/lib/appnigma/generated/models/logic_run.rb +483 -0
  123. data/lib/appnigma/generated/models/logic_test_call.rb +269 -0
  124. data/lib/appnigma/generated/models/platform_entry.rb +63 -6
  125. data/lib/appnigma/generated/models/platform_entry_coverage_inner.rb +1 -1
  126. data/lib/appnigma/generated/models/platform_request_input.rb +1 -1
  127. data/lib/appnigma/generated/models/platform_request_input_body.rb +1 -1
  128. data/lib/appnigma/generated/models/platform_request_output.rb +1 -1
  129. data/lib/appnigma/generated/models/ran_as.rb +1 -1
  130. data/lib/appnigma/generated/models/record_change.rb +231 -0
  131. data/lib/appnigma/generated/models/record_change_record.rb +105 -0
  132. data/lib/appnigma/generated/models/run_action_input.rb +1 -1
  133. data/lib/appnigma/generated/models/run_action_output.rb +1 -1
  134. data/lib/appnigma/generated/models/run_input.rb +1 -1
  135. data/lib/appnigma/generated/models/run_output.rb +1 -1
  136. data/lib/appnigma/generated/models/sdk_error.rb +1 -1
  137. data/lib/appnigma/generated/models/sdk_error_error.rb +3 -3
  138. data/lib/appnigma/generated/models/sdk_error_error_details.rb +81 -6
  139. data/lib/appnigma/generated/models/sdk_problem.rb +1 -1
  140. data/lib/appnigma/generated/models/set_alerts_input.rb +197 -0
  141. data/lib/appnigma/generated/models/set_alerts_output.rb +180 -0
  142. data/lib/appnigma/generated/models/set_sync_input.rb +177 -0
  143. data/lib/appnigma/generated/models/set_sync_output.rb +207 -0
  144. data/lib/appnigma/generated/models/switch_logic_off_input.rb +200 -0
  145. data/lib/appnigma/generated/models/switch_logic_off_output.rb +315 -0
  146. data/lib/appnigma/generated/models/switch_logic_on_input.rb +200 -0
  147. data/lib/appnigma/generated/models/switch_logic_on_output.rb +315 -0
  148. data/lib/appnigma/generated/models/sync_health.rb +231 -0
  149. data/lib/appnigma/generated/models/test_logic_input.rb +355 -0
  150. data/lib/appnigma/generated/models/test_logic_output.rb +418 -0
  151. data/lib/appnigma/generated/models/test_logic_output_error.rb +231 -0
  152. data/lib/appnigma/generated/models/update_logic_input.rb +359 -0
  153. data/lib/appnigma/generated/models/update_logic_output.rb +205 -0
  154. data/lib/appnigma/generated/version.rb +1 -1
  155. data/lib/appnigma/generated.rb +77 -1
  156. data/lib/appnigma/logic.rb +176 -0
  157. data/lib/appnigma/names.rb +4 -4
  158. data/lib/appnigma/platforms.rb +11 -1
  159. data/lib/appnigma/portal.rb +8 -5
  160. data/lib/appnigma/records.rb +46 -0
  161. data/lib/appnigma/schema_type.rb +149 -0
  162. data/lib/appnigma/sync.rb +30 -0
  163. data/lib/appnigma/types_printer.rb +154 -0
  164. data/lib/appnigma/verify_webhook.rb +107 -0
  165. data/lib/appnigma/version.rb +2 -2
  166. data/lib/appnigma/webhooks.rb +79 -0
  167. data/lib/appnigma.rb +1 -0
  168. metadata +95 -3
@@ -0,0 +1,180 @@
1
+ =begin
2
+ #Appnigma SDK API
3
+
4
+ #The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
5
+
6
+ The version of the OpenAPI document: 5.4.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Appnigma::Generated
17
+ class SetAlertsOutput < ApiModelBase
18
+ # The event types sent to your webhooks, in a fixed order. Every type until you choose.
19
+ attr_accessor :events
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'events' => :'events'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'events' => :'Array<ClientEventType>'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Returns attribute type mapping
52
+ def self.acceptable_openapi_types
53
+ openapi_types
54
+ end
55
+
56
+ # Returns the nullable attributes
57
+ def self.acceptable_openapi_nullable
58
+ openapi_nullable
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::SetAlertsOutput` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ acceptable_attribute_map = self.class.acceptable_attribute_map
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!acceptable_attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::SetAlertsOutput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'events')
78
+ if (value = attributes[:'events']).is_a?(Array)
79
+ self.events = value
80
+ end
81
+ else
82
+ self.events = nil
83
+ end
84
+ end
85
+
86
+ # Show invalid properties with the reasons. Usually used together with valid?
87
+ # @return Array for valid properties with the reasons
88
+ def list_invalid_properties
89
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
90
+ invalid_properties = Array.new
91
+ if @events.nil?
92
+ invalid_properties.push('invalid value for "events", events cannot be nil.')
93
+ end
94
+
95
+ invalid_properties
96
+ end
97
+
98
+ # Check to see if the all the properties in the model are valid
99
+ # @return true if the model is valid
100
+ def valid?
101
+ warn '[DEPRECATED] the `valid?` method is obsolete'
102
+ return false if @events.nil?
103
+ true
104
+ end
105
+
106
+ # Custom attribute writer method with validation
107
+ # @param [Object] events Value to be assigned
108
+ def events=(events)
109
+ if events.nil?
110
+ fail ArgumentError, 'events cannot be nil'
111
+ end
112
+
113
+ @events = events
114
+ end
115
+
116
+ # Checks equality by comparing each attribute.
117
+ # @param [Object] Object to be compared
118
+ def ==(o)
119
+ return true if self.equal?(o)
120
+ self.class == o.class &&
121
+ events == o.events
122
+ end
123
+
124
+ # @see the `==` method
125
+ # @param [Object] Object to be compared
126
+ def eql?(o)
127
+ self == o
128
+ end
129
+
130
+ # Calculates hash code according to all attributes.
131
+ # @return [Integer] Hash code
132
+ def hash
133
+ [events].hash
134
+ end
135
+
136
+ # Builds the object from hash
137
+ # @param [Hash] attributes Model attributes in the form of hash
138
+ # @return [Object] Returns the model itself
139
+ def self.build_from_hash(attributes)
140
+ return nil unless attributes.is_a?(Hash)
141
+ attributes = attributes.transform_keys(&:to_sym)
142
+ # include attributes inherited from allOf parents (the nearest declaration wins)
143
+ map = acceptable_attribute_map
144
+ transformed_hash = {}
145
+ acceptable_openapi_types.each_pair do |key, type|
146
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
147
+ transformed_hash["#{key}"] = nil
148
+ elsif type =~ /\AArray<(.*)>/i
149
+ # check to ensure the input is an array given that the attribute
150
+ # is documented as an array but the input is not
151
+ if attributes[map[key]].is_a?(Array)
152
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
153
+ end
154
+ elsif !attributes[map[key]].nil?
155
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
156
+ end
157
+ end
158
+ new(transformed_hash)
159
+ end
160
+
161
+ # Returns the object in the form of hash
162
+ # @return [Hash] Returns the object in the form of hash
163
+ def to_hash
164
+ hash = {}
165
+ # include attributes inherited from allOf parents (the nearest declaration wins)
166
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
167
+ value = self.send(attr)
168
+ if value.nil?
169
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
170
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
171
+ end
172
+
173
+ hash[param] = _to_hash(value)
174
+ end
175
+ hash
176
+ end
177
+
178
+ end
179
+
180
+ end
@@ -0,0 +1,177 @@
1
+ =begin
2
+ #Appnigma SDK API
3
+
4
+ #The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
5
+
6
+ The version of the OpenAPI document: 5.4.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Appnigma::Generated
17
+ class SetSyncInput < ApiModelBase
18
+ attr_accessor :on
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'on' => :'on'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'on' => :'Boolean'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Returns attribute type mapping
51
+ def self.acceptable_openapi_types
52
+ openapi_types
53
+ end
54
+
55
+ # Returns the nullable attributes
56
+ def self.acceptable_openapi_nullable
57
+ openapi_nullable
58
+ end
59
+
60
+ # Initializes the object
61
+ # @param [Hash] attributes Model attributes in the form of hash
62
+ def initialize(attributes = {})
63
+ if (!attributes.is_a?(Hash))
64
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::SetSyncInput` initialize method"
65
+ end
66
+
67
+ # check to see if the attribute exists and convert string to symbol for hash key
68
+ acceptable_attribute_map = self.class.acceptable_attribute_map
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!acceptable_attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::SetSyncInput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'on')
77
+ self.on = attributes[:'on']
78
+ else
79
+ self.on = nil
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
87
+ invalid_properties = Array.new
88
+ if @on.nil?
89
+ invalid_properties.push('invalid value for "on", on cannot be nil.')
90
+ end
91
+
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
+ return false if @on.nil?
100
+ true
101
+ end
102
+
103
+ # Custom attribute writer method with validation
104
+ # @param [Object] on Value to be assigned
105
+ def on=(on)
106
+ if on.nil?
107
+ fail ArgumentError, 'on cannot be nil'
108
+ end
109
+
110
+ @on = on
111
+ end
112
+
113
+ # Checks equality by comparing each attribute.
114
+ # @param [Object] Object to be compared
115
+ def ==(o)
116
+ return true if self.equal?(o)
117
+ self.class == o.class &&
118
+ on == o.on
119
+ end
120
+
121
+ # @see the `==` method
122
+ # @param [Object] Object to be compared
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Integer] Hash code
129
+ def hash
130
+ [on].hash
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def self.build_from_hash(attributes)
137
+ return nil unless attributes.is_a?(Hash)
138
+ attributes = attributes.transform_keys(&:to_sym)
139
+ # include attributes inherited from allOf parents (the nearest declaration wins)
140
+ map = acceptable_attribute_map
141
+ transformed_hash = {}
142
+ acceptable_openapi_types.each_pair do |key, type|
143
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
144
+ transformed_hash["#{key}"] = nil
145
+ elsif type =~ /\AArray<(.*)>/i
146
+ # check to ensure the input is an array given that the attribute
147
+ # is documented as an array but the input is not
148
+ if attributes[map[key]].is_a?(Array)
149
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
150
+ end
151
+ elsif !attributes[map[key]].nil?
152
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
153
+ end
154
+ end
155
+ new(transformed_hash)
156
+ end
157
+
158
+ # Returns the object in the form of hash
159
+ # @return [Hash] Returns the object in the form of hash
160
+ def to_hash
161
+ hash = {}
162
+ # include attributes inherited from allOf parents (the nearest declaration wins)
163
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
164
+ value = self.send(attr)
165
+ if value.nil?
166
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
167
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
168
+ end
169
+
170
+ hash[param] = _to_hash(value)
171
+ end
172
+ hash
173
+ end
174
+
175
+ end
176
+
177
+ end
@@ -0,0 +1,207 @@
1
+ =begin
2
+ #Appnigma SDK API
3
+
4
+ #The routes a customer's product calls through an Appnigma SDK. Every answer carries a request id in X-Request-Id; quote it when you write to support.
5
+
6
+ The version of the OpenAPI document: 5.4.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Appnigma::Generated
17
+ class SetSyncOutput < ApiModelBase
18
+ # Whether changes in your end customers' accounts are being noticed
19
+ attr_accessor :on
20
+
21
+ # The platforms it reads: those whose API can list records changed since a time
22
+ attr_accessor :platforms
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'on' => :'on',
28
+ :'platforms' => :'platforms'
29
+ }
30
+ end
31
+
32
+ # Returns attribute mapping this model knows about
33
+ def self.acceptable_attribute_map
34
+ attribute_map
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ acceptable_attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'on' => :'Boolean',
46
+ :'platforms' => :'Array<String>'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Returns attribute type mapping
57
+ def self.acceptable_openapi_types
58
+ openapi_types
59
+ end
60
+
61
+ # Returns the nullable attributes
62
+ def self.acceptable_openapi_nullable
63
+ openapi_nullable
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::SetSyncOutput` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ acceptable_attribute_map = self.class.acceptable_attribute_map
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!acceptable_attribute_map.key?(k.to_sym))
77
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::SetSyncOutput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
78
+ end
79
+ h[k.to_sym] = v
80
+ }
81
+
82
+ if attributes.key?(:'on')
83
+ self.on = attributes[:'on']
84
+ else
85
+ self.on = nil
86
+ end
87
+
88
+ if attributes.key?(:'platforms')
89
+ if (value = attributes[:'platforms']).is_a?(Array)
90
+ self.platforms = value
91
+ end
92
+ else
93
+ self.platforms = nil
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
+ invalid_properties = Array.new
102
+ if @on.nil?
103
+ invalid_properties.push('invalid value for "on", on cannot be nil.')
104
+ end
105
+
106
+ if @platforms.nil?
107
+ invalid_properties.push('invalid value for "platforms", platforms cannot be nil.')
108
+ end
109
+
110
+ invalid_properties
111
+ end
112
+
113
+ # Check to see if the all the properties in the model are valid
114
+ # @return true if the model is valid
115
+ def valid?
116
+ warn '[DEPRECATED] the `valid?` method is obsolete'
117
+ return false if @on.nil?
118
+ return false if @platforms.nil?
119
+ true
120
+ end
121
+
122
+ # Custom attribute writer method with validation
123
+ # @param [Object] on Value to be assigned
124
+ def on=(on)
125
+ if on.nil?
126
+ fail ArgumentError, 'on cannot be nil'
127
+ end
128
+
129
+ @on = on
130
+ end
131
+
132
+ # Custom attribute writer method with validation
133
+ # @param [Object] platforms Value to be assigned
134
+ def platforms=(platforms)
135
+ if platforms.nil?
136
+ fail ArgumentError, 'platforms cannot be nil'
137
+ end
138
+
139
+ @platforms = platforms
140
+ end
141
+
142
+ # Checks equality by comparing each attribute.
143
+ # @param [Object] Object to be compared
144
+ def ==(o)
145
+ return true if self.equal?(o)
146
+ self.class == o.class &&
147
+ on == o.on &&
148
+ platforms == o.platforms
149
+ end
150
+
151
+ # @see the `==` method
152
+ # @param [Object] Object to be compared
153
+ def eql?(o)
154
+ self == o
155
+ end
156
+
157
+ # Calculates hash code according to all attributes.
158
+ # @return [Integer] Hash code
159
+ def hash
160
+ [on, platforms].hash
161
+ end
162
+
163
+ # Builds the object from hash
164
+ # @param [Hash] attributes Model attributes in the form of hash
165
+ # @return [Object] Returns the model itself
166
+ def self.build_from_hash(attributes)
167
+ return nil unless attributes.is_a?(Hash)
168
+ attributes = attributes.transform_keys(&:to_sym)
169
+ # include attributes inherited from allOf parents (the nearest declaration wins)
170
+ map = acceptable_attribute_map
171
+ transformed_hash = {}
172
+ acceptable_openapi_types.each_pair do |key, type|
173
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
174
+ transformed_hash["#{key}"] = nil
175
+ elsif type =~ /\AArray<(.*)>/i
176
+ # check to ensure the input is an array given that the attribute
177
+ # is documented as an array but the input is not
178
+ if attributes[map[key]].is_a?(Array)
179
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
180
+ end
181
+ elsif !attributes[map[key]].nil?
182
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
183
+ end
184
+ end
185
+ new(transformed_hash)
186
+ end
187
+
188
+ # Returns the object in the form of hash
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_hash
191
+ hash = {}
192
+ # include attributes inherited from allOf parents (the nearest declaration wins)
193
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
194
+ value = self.send(attr)
195
+ if value.nil?
196
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
197
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
198
+ end
199
+
200
+ hash[param] = _to_hash(value)
201
+ end
202
+ hash
203
+ end
204
+
205
+ end
206
+
207
+ end