appnigma-sdk 2.1.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 +7 -0
  3. data/README.md +567 -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 +58 -5
  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 +2103 -402
  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 +1 -1
  75. data/lib/appnigma/generated/models/disconnect_connection_output.rb +18 -5
  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 +75 -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 +93 -3
@@ -3,7 +3,7 @@
3
3
 
4
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
5
 
6
- The version of the OpenAPI document: 4.1.0
6
+ The version of the OpenAPI document: 5.4.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.26.0
@@ -18,7 +18,7 @@ module Appnigma::Generated
18
18
  # Your own id for the end customer, exactly as you sent it
19
19
  attr_accessor :end_customer_id
20
20
 
21
- # The folder for this end customer's own logic, end-customers/<logicFolderKey>/ in your logic repo. Null only for an end customer connected before the key existed, until the backfill has run.
21
+ # The folder for this end customer's own logic, end-customers/<logicFolderKey>/ in your logic repo
22
22
  attr_accessor :logic_folder_key
23
23
 
24
24
  # True when the live version holds at least one function written for this end customer
@@ -60,7 +60,6 @@ module Appnigma::Generated
60
60
  # List of attributes with nullable: true
61
61
  def self.openapi_nullable
62
62
  Set.new([
63
- :'logic_folder_key',
64
63
  ])
65
64
  end
66
65
 
@@ -126,6 +125,10 @@ module Appnigma::Generated
126
125
  invalid_properties.push('invalid value for "end_customer_id", end_customer_id cannot be nil.')
127
126
  end
128
127
 
128
+ if @logic_folder_key.nil?
129
+ invalid_properties.push('invalid value for "logic_folder_key", logic_folder_key cannot be nil.')
130
+ end
131
+
129
132
  if @has_custom_logic.nil?
130
133
  invalid_properties.push('invalid value for "has_custom_logic", has_custom_logic cannot be nil.')
131
134
  end
@@ -142,6 +145,7 @@ module Appnigma::Generated
142
145
  def valid?
143
146
  warn '[DEPRECATED] the `valid?` method is obsolete'
144
147
  return false if @end_customer_id.nil?
148
+ return false if @logic_folder_key.nil?
145
149
  return false if @has_custom_logic.nil?
146
150
  return false if @connections.nil?
147
151
  true
@@ -157,6 +161,16 @@ module Appnigma::Generated
157
161
  @end_customer_id = end_customer_id
158
162
  end
159
163
 
164
+ # Custom attribute writer method with validation
165
+ # @param [Object] logic_folder_key Value to be assigned
166
+ def logic_folder_key=(logic_folder_key)
167
+ if logic_folder_key.nil?
168
+ fail ArgumentError, 'logic_folder_key cannot be nil'
169
+ end
170
+
171
+ @logic_folder_key = logic_folder_key
172
+ end
173
+
160
174
  # Custom attribute writer method with validation
161
175
  # @param [Object] has_custom_logic Value to be assigned
162
176
  def has_custom_logic=(has_custom_logic)
@@ -3,7 +3,7 @@
3
3
 
4
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
5
 
6
- The version of the OpenAPI document: 4.1.0
6
+ The version of the OpenAPI document: 5.4.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.26.0
@@ -3,7 +3,7 @@
3
3
 
4
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
5
 
6
- The version of the OpenAPI document: 4.1.0
6
+ The version of the OpenAPI document: 5.4.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.26.0
@@ -3,7 +3,7 @@
3
3
 
4
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
5
 
6
- The version of the OpenAPI document: 4.1.0
6
+ The version of the OpenAPI document: 5.4.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.26.0
@@ -3,7 +3,7 @@
3
3
 
4
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
5
 
6
- The version of the OpenAPI document: 4.1.0
6
+ The version of the OpenAPI document: 5.4.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.26.0
@@ -3,7 +3,7 @@
3
3
 
4
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
5
 
6
- The version of the OpenAPI document: 4.1.0
6
+ The version of the OpenAPI document: 5.4.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.26.0
@@ -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 GetAlertsOutput < 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::GetAlertsOutput` 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::GetAlertsOutput`. 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,256 @@
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 GetConnectKeyOutput < ApiModelBase
18
+ # Send it back as encryptedFields.keyId. It changes when the key does.
19
+ attr_accessor :key_id
20
+
21
+ # The RSA public key, as SubjectPublicKeyInfo (DER), in standard base64
22
+ attr_accessor :public_key
23
+
24
+ # RSA-OAEP with SHA-256 encrypts a one-time AES-256-GCM key, which encrypts the fields
25
+ attr_accessor :algorithm
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
+ :'key_id' => :'keyId',
53
+ :'public_key' => :'publicKey',
54
+ :'algorithm' => :'algorithm'
55
+ }
56
+ end
57
+
58
+ # Returns attribute mapping this model knows about
59
+ def self.acceptable_attribute_map
60
+ attribute_map
61
+ end
62
+
63
+ # Returns all the JSON keys this model knows about
64
+ def self.acceptable_attributes
65
+ acceptable_attribute_map.values
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'key_id' => :'String',
72
+ :'public_key' => :'String',
73
+ :'algorithm' => :'String'
74
+ }
75
+ end
76
+
77
+ # List of attributes with nullable: true
78
+ def self.openapi_nullable
79
+ Set.new([
80
+ ])
81
+ end
82
+
83
+ # Returns attribute type mapping
84
+ def self.acceptable_openapi_types
85
+ openapi_types
86
+ end
87
+
88
+ # Returns the nullable attributes
89
+ def self.acceptable_openapi_nullable
90
+ openapi_nullable
91
+ end
92
+
93
+ # Initializes the object
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ def initialize(attributes = {})
96
+ if (!attributes.is_a?(Hash))
97
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::GetConnectKeyOutput` initialize method"
98
+ end
99
+
100
+ # check to see if the attribute exists and convert string to symbol for hash key
101
+ acceptable_attribute_map = self.class.acceptable_attribute_map
102
+ attributes = attributes.each_with_object({}) { |(k, v), h|
103
+ if (!acceptable_attribute_map.key?(k.to_sym))
104
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::GetConnectKeyOutput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
105
+ end
106
+ h[k.to_sym] = v
107
+ }
108
+
109
+ if attributes.key?(:'key_id')
110
+ self.key_id = attributes[:'key_id']
111
+ else
112
+ self.key_id = nil
113
+ end
114
+
115
+ if attributes.key?(:'public_key')
116
+ self.public_key = attributes[:'public_key']
117
+ else
118
+ self.public_key = nil
119
+ end
120
+
121
+ if attributes.key?(:'algorithm')
122
+ self.algorithm = attributes[:'algorithm']
123
+ else
124
+ self.algorithm = nil
125
+ end
126
+ end
127
+
128
+ # Show invalid properties with the reasons. Usually used together with valid?
129
+ # @return Array for valid properties with the reasons
130
+ def list_invalid_properties
131
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
132
+ invalid_properties = Array.new
133
+ if @key_id.nil?
134
+ invalid_properties.push('invalid value for "key_id", key_id cannot be nil.')
135
+ end
136
+
137
+ if @public_key.nil?
138
+ invalid_properties.push('invalid value for "public_key", public_key cannot be nil.')
139
+ end
140
+
141
+ if @algorithm.nil?
142
+ invalid_properties.push('invalid value for "algorithm", algorithm cannot be nil.')
143
+ end
144
+
145
+ invalid_properties
146
+ end
147
+
148
+ # Check to see if the all the properties in the model are valid
149
+ # @return true if the model is valid
150
+ def valid?
151
+ warn '[DEPRECATED] the `valid?` method is obsolete'
152
+ return false if @key_id.nil?
153
+ return false if @public_key.nil?
154
+ return false if @algorithm.nil?
155
+ algorithm_validator = EnumAttributeValidator.new('String', ["RSA-OAEP-256+A256GCM"])
156
+ return false unless algorithm_validator.valid?(@algorithm)
157
+ true
158
+ end
159
+
160
+ # Custom attribute writer method with validation
161
+ # @param [Object] key_id Value to be assigned
162
+ def key_id=(key_id)
163
+ if key_id.nil?
164
+ fail ArgumentError, 'key_id cannot be nil'
165
+ end
166
+
167
+ @key_id = key_id
168
+ end
169
+
170
+ # Custom attribute writer method with validation
171
+ # @param [Object] public_key Value to be assigned
172
+ def public_key=(public_key)
173
+ if public_key.nil?
174
+ fail ArgumentError, 'public_key cannot be nil'
175
+ end
176
+
177
+ @public_key = public_key
178
+ end
179
+
180
+ # Custom attribute writer method checking allowed values (enum).
181
+ # @param [Object] algorithm Object to be assigned
182
+ def algorithm=(algorithm)
183
+ validator = EnumAttributeValidator.new('String', ["RSA-OAEP-256+A256GCM"])
184
+ unless validator.valid?(algorithm)
185
+ fail ArgumentError, "invalid value for \"algorithm\", must be one of #{validator.allowable_values}."
186
+ end
187
+ @algorithm = algorithm
188
+ end
189
+
190
+ # Checks equality by comparing each attribute.
191
+ # @param [Object] Object to be compared
192
+ def ==(o)
193
+ return true if self.equal?(o)
194
+ self.class == o.class &&
195
+ key_id == o.key_id &&
196
+ public_key == o.public_key &&
197
+ algorithm == o.algorithm
198
+ end
199
+
200
+ # @see the `==` method
201
+ # @param [Object] Object to be compared
202
+ def eql?(o)
203
+ self == o
204
+ end
205
+
206
+ # Calculates hash code according to all attributes.
207
+ # @return [Integer] Hash code
208
+ def hash
209
+ [key_id, public_key, algorithm].hash
210
+ end
211
+
212
+ # Builds the object from hash
213
+ # @param [Hash] attributes Model attributes in the form of hash
214
+ # @return [Object] Returns the model itself
215
+ def self.build_from_hash(attributes)
216
+ return nil unless attributes.is_a?(Hash)
217
+ attributes = attributes.transform_keys(&:to_sym)
218
+ # include attributes inherited from allOf parents (the nearest declaration wins)
219
+ map = acceptable_attribute_map
220
+ transformed_hash = {}
221
+ acceptable_openapi_types.each_pair do |key, type|
222
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
223
+ transformed_hash["#{key}"] = nil
224
+ elsif type =~ /\AArray<(.*)>/i
225
+ # check to ensure the input is an array given that the attribute
226
+ # is documented as an array but the input is not
227
+ if attributes[map[key]].is_a?(Array)
228
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
229
+ end
230
+ elsif !attributes[map[key]].nil?
231
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
232
+ end
233
+ end
234
+ new(transformed_hash)
235
+ end
236
+
237
+ # Returns the object in the form of hash
238
+ # @return [Hash] Returns the object in the form of hash
239
+ def to_hash
240
+ hash = {}
241
+ # include attributes inherited from allOf parents (the nearest declaration wins)
242
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
243
+ value = self.send(attr)
244
+ if value.nil?
245
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
246
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
247
+ end
248
+
249
+ hash[param] = _to_hash(value)
250
+ end
251
+ hash
252
+ end
253
+
254
+ end
255
+
256
+ end
@@ -3,7 +3,7 @@
3
3
 
4
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
5
 
6
- The version of the OpenAPI document: 4.1.0
6
+ The version of the OpenAPI document: 5.4.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.26.0
@@ -3,7 +3,7 @@
3
3
 
4
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
5
 
6
- The version of the OpenAPI document: 4.1.0
6
+ The version of the OpenAPI document: 5.4.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.26.0
@@ -21,9 +21,12 @@ module Appnigma::Generated
21
21
 
22
22
  attr_accessor :status
23
23
 
24
- # The folder for this end customer's own logic, end-customers/<logicFolderKey>/ in your logic repo. The same on every platform. Null only for a connection made before the key existed, until the backfill has run.
24
+ # The folder for this end customer's own logic, end-customers/<logicFolderKey>/ in your logic repo. The same on every platform.
25
25
  attr_accessor :logic_folder_key
26
26
 
27
+ # How the sync has been reading this account; null until it has read it once
28
+ attr_accessor :sync
29
+
27
30
  class EnumAttributeValidator
28
31
  attr_reader :datatype
29
32
  attr_reader :allowable_values
@@ -52,7 +55,8 @@ module Appnigma::Generated
52
55
  :'end_customer_id' => :'endCustomerId',
53
56
  :'platform' => :'platform',
54
57
  :'status' => :'status',
55
- :'logic_folder_key' => :'logicFolderKey'
58
+ :'logic_folder_key' => :'logicFolderKey',
59
+ :'sync' => :'sync'
56
60
  }
57
61
  end
58
62
 
@@ -72,14 +76,15 @@ module Appnigma::Generated
72
76
  :'end_customer_id' => :'String',
73
77
  :'platform' => :'String',
74
78
  :'status' => :'ConnectionStatus',
75
- :'logic_folder_key' => :'String'
79
+ :'logic_folder_key' => :'String',
80
+ :'sync' => :'SyncHealth'
76
81
  }
77
82
  end
78
83
 
79
84
  # List of attributes with nullable: true
80
85
  def self.openapi_nullable
81
86
  Set.new([
82
- :'logic_folder_key'
87
+ :'sync'
83
88
  ])
84
89
  end
85
90
 
@@ -132,6 +137,12 @@ module Appnigma::Generated
132
137
  else
133
138
  self.logic_folder_key = nil
134
139
  end
140
+
141
+ if attributes.key?(:'sync')
142
+ self.sync = attributes[:'sync']
143
+ else
144
+ self.sync = nil
145
+ end
135
146
  end
136
147
 
137
148
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -151,6 +162,10 @@ module Appnigma::Generated
151
162
  invalid_properties.push('invalid value for "status", status cannot be nil.')
152
163
  end
153
164
 
165
+ if @logic_folder_key.nil?
166
+ invalid_properties.push('invalid value for "logic_folder_key", logic_folder_key cannot be nil.')
167
+ end
168
+
154
169
  invalid_properties
155
170
  end
156
171
 
@@ -161,6 +176,7 @@ module Appnigma::Generated
161
176
  return false if @end_customer_id.nil?
162
177
  return false if @platform.nil?
163
178
  return false if @status.nil?
179
+ return false if @logic_folder_key.nil?
164
180
  true
165
181
  end
166
182
 
@@ -194,6 +210,16 @@ module Appnigma::Generated
194
210
  @status = status
195
211
  end
196
212
 
213
+ # Custom attribute writer method with validation
214
+ # @param [Object] logic_folder_key Value to be assigned
215
+ def logic_folder_key=(logic_folder_key)
216
+ if logic_folder_key.nil?
217
+ fail ArgumentError, 'logic_folder_key cannot be nil'
218
+ end
219
+
220
+ @logic_folder_key = logic_folder_key
221
+ end
222
+
197
223
  # Checks equality by comparing each attribute.
198
224
  # @param [Object] Object to be compared
199
225
  def ==(o)
@@ -202,7 +228,8 @@ module Appnigma::Generated
202
228
  end_customer_id == o.end_customer_id &&
203
229
  platform == o.platform &&
204
230
  status == o.status &&
205
- logic_folder_key == o.logic_folder_key
231
+ logic_folder_key == o.logic_folder_key &&
232
+ sync == o.sync
206
233
  end
207
234
 
208
235
  # @see the `==` method
@@ -214,7 +241,7 @@ module Appnigma::Generated
214
241
  # Calculates hash code according to all attributes.
215
242
  # @return [Integer] Hash code
216
243
  def hash
217
- [end_customer_id, platform, status, logic_folder_key].hash
244
+ [end_customer_id, platform, status, logic_folder_key, sync].hash
218
245
  end
219
246
 
220
247
  # Builds the object from hash
@@ -3,7 +3,7 @@
3
3
 
4
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
5
 
6
- The version of the OpenAPI document: 4.1.0
6
+ The version of the OpenAPI document: 5.4.0
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.26.0