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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +567 -26
- data/exe/appnigma +8 -0
- data/lib/appnigma/actions.rb +33 -0
- data/lib/appnigma/checks.rb +13 -0
- data/lib/appnigma/client.rb +30 -13
- data/lib/appnigma/command.rb +154 -0
- data/lib/appnigma/command_files.rb +46 -0
- data/lib/appnigma/connect_fields.rb +83 -0
- data/lib/appnigma/connections.rb +58 -5
- data/lib/appnigma/constants.rb +57 -0
- data/lib/appnigma/end_customers.rb +29 -0
- data/lib/appnigma/errors.rb +44 -6
- data/lib/appnigma/features.rb +19 -0
- data/lib/appnigma/files.rb +26 -0
- data/lib/appnigma/generated/api/default_api.rb +2103 -402
- data/lib/appnigma/generated/api_client.rb +1 -1
- data/lib/appnigma/generated/api_error.rb +1 -1
- data/lib/appnigma/generated/api_model_base.rb +1 -1
- data/lib/appnigma/generated/configuration.rb +1 -1
- data/lib/appnigma/generated/models/action_entry.rb +1 -1
- data/lib/appnigma/generated/models/check_logic_input.rb +276 -0
- data/lib/appnigma/generated/models/check_logic_output.rb +193 -0
- data/lib/appnigma/generated/models/client_event.rb +309 -0
- data/lib/appnigma/generated/models/client_event_delivery.rb +306 -0
- data/lib/appnigma/generated/models/client_event_type.rb +44 -0
- data/lib/appnigma/generated/models/client_webhook.rb +346 -0
- data/lib/appnigma/generated/models/connect_end_customer_input.rb +243 -0
- data/lib/appnigma/generated/models/connect_end_customer_output.rb +294 -0
- data/lib/appnigma/generated/models/connect_field.rb +308 -0
- data/lib/appnigma/generated/models/connection_status.rb +1 -1
- data/lib/appnigma/generated/models/create_connection_link_input.rb +1 -1
- data/lib/appnigma/generated/models/create_connection_link_output.rb +1 -1
- data/lib/appnigma/generated/models/create_logic_input.rb +273 -0
- data/lib/appnigma/generated/models/create_logic_input_trigger.rb +104 -0
- data/lib/appnigma/generated/models/create_logic_input_trigger_any_of.rb +257 -0
- data/lib/appnigma/generated/models/create_logic_input_trigger_any_of1.rb +238 -0
- data/lib/appnigma/generated/models/create_logic_output.rb +230 -0
- data/lib/appnigma/generated/models/create_portal_link_input.rb +2 -18
- data/lib/appnigma/generated/models/create_portal_link_output.rb +1 -1
- data/lib/appnigma/generated/models/create_webhook_input.rb +187 -0
- data/lib/appnigma/generated/models/create_webhook_output.rb +204 -0
- data/lib/appnigma/generated/models/crm_company.rb +1 -1
- data/lib/appnigma/generated/models/crm_company_get_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_company_list_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_company_write_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_contact.rb +1 -1
- data/lib/appnigma/generated/models/crm_contact_get_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_contact_list_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_contact_write_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_create_input.rb +1 -1
- data/lib/appnigma/generated/models/crm_custom_field.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal_create_input.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal_get_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal_list_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_deal_write_output.rb +1 -1
- data/lib/appnigma/generated/models/crm_email.rb +1 -1
- data/lib/appnigma/generated/models/crm_get_input.rb +1 -1
- data/lib/appnigma/generated/models/crm_labelled.rb +1 -1
- data/lib/appnigma/generated/models/crm_list_input.rb +1 -1
- data/lib/appnigma/generated/models/crm_phone.rb +1 -1
- data/lib/appnigma/generated/models/crm_update_input.rb +1 -1
- data/lib/appnigma/generated/models/delete_end_customer_input.rb +178 -0
- data/lib/appnigma/generated/models/delete_end_customer_output.rb +286 -0
- data/lib/appnigma/generated/models/delete_end_customer_output_connections_inner.rb +238 -0
- data/lib/appnigma/generated/models/delete_end_customer_output_logic_folder.rb +255 -0
- data/lib/appnigma/generated/models/delete_end_customer_output_steps_inner.rb +257 -0
- data/lib/appnigma/generated/models/delete_webhook_input.rb +189 -0
- data/lib/appnigma/generated/models/delete_webhook_output.rb +228 -0
- data/lib/appnigma/generated/models/discard_logic_input.rb +292 -0
- data/lib/appnigma/generated/models/discard_logic_output.rb +254 -0
- data/lib/appnigma/generated/models/disconnect_connection_input.rb +1 -1
- data/lib/appnigma/generated/models/disconnect_connection_output.rb +18 -5
- data/lib/appnigma/generated/models/edit_logic_input.rb +368 -0
- data/lib/appnigma/generated/models/edit_logic_output.rb +298 -0
- data/lib/appnigma/generated/models/encrypted_fields.rb +357 -0
- data/lib/appnigma/generated/models/end_customer.rb +17 -3
- data/lib/appnigma/generated/models/end_customer_connection.rb +1 -1
- data/lib/appnigma/generated/models/function_entry.rb +1 -1
- data/lib/appnigma/generated/models/function_owner.rb +1 -1
- data/lib/appnigma/generated/models/function_owner_one_of.rb +1 -1
- data/lib/appnigma/generated/models/function_owner_one_of1.rb +1 -1
- data/lib/appnigma/generated/models/get_alerts_output.rb +180 -0
- data/lib/appnigma/generated/models/get_connect_key_output.rb +256 -0
- data/lib/appnigma/generated/models/get_connection_input.rb +1 -1
- data/lib/appnigma/generated/models/get_connection_output.rb +34 -7
- data/lib/appnigma/generated/models/get_guide_output.rb +1 -1
- data/lib/appnigma/generated/models/get_logic_go_live_status_input.rb +247 -0
- data/lib/appnigma/generated/models/get_logic_go_live_status_output.rb +296 -0
- data/lib/appnigma/generated/models/get_logic_input.rb +247 -0
- data/lib/appnigma/generated/models/get_logic_output.rb +240 -0
- data/lib/appnigma/generated/models/get_logic_output_file.rb +204 -0
- data/lib/appnigma/generated/models/get_platform_input.rb +188 -0
- data/lib/appnigma/generated/models/get_platform_output.rb +326 -0
- data/lib/appnigma/generated/models/get_sync_output.rb +207 -0
- data/lib/appnigma/generated/models/go_live_logic_input.rb +316 -0
- data/lib/appnigma/generated/models/go_live_logic_output.rb +281 -0
- data/lib/appnigma/generated/models/json_value.rb +1 -1
- data/lib/appnigma/generated/models/list_actions_output.rb +1 -1
- data/lib/appnigma/generated/models/list_connections_output.rb +3 -3
- data/lib/appnigma/generated/models/list_events_input.rb +302 -0
- data/lib/appnigma/generated/models/list_events_output.rb +193 -0
- data/lib/appnigma/generated/models/list_features_output.rb +179 -0
- data/lib/appnigma/generated/models/list_features_output_features_inner.rb +229 -0
- data/lib/appnigma/generated/models/list_functions_output.rb +1 -1
- data/lib/appnigma/generated/models/list_logic_input.rb +162 -0
- data/lib/appnigma/generated/models/list_logic_output.rb +209 -0
- data/lib/appnigma/generated/models/list_logic_runs_input.rb +275 -0
- data/lib/appnigma/generated/models/list_logic_runs_output.rb +193 -0
- data/lib/appnigma/generated/models/list_platforms_output.rb +1 -1
- data/lib/appnigma/generated/models/list_record_changes_input.rb +375 -0
- data/lib/appnigma/generated/models/list_record_changes_output.rb +193 -0
- data/lib/appnigma/generated/models/list_webhooks_output.rb +180 -0
- data/lib/appnigma/generated/models/logic_check_problem.rb +203 -0
- data/lib/appnigma/generated/models/logic_conditional.rb +3 -3
- data/lib/appnigma/generated/models/logic_draft.rb +257 -0
- data/lib/appnigma/generated/models/logic_entry.rb +441 -0
- data/lib/appnigma/generated/models/logic_entry_failure.rb +205 -0
- data/lib/appnigma/generated/models/logic_folder_problem.rb +218 -0
- data/lib/appnigma/generated/models/logic_run.rb +483 -0
- data/lib/appnigma/generated/models/logic_test_call.rb +269 -0
- data/lib/appnigma/generated/models/platform_entry.rb +63 -6
- data/lib/appnigma/generated/models/platform_entry_coverage_inner.rb +1 -1
- data/lib/appnigma/generated/models/platform_request_input.rb +1 -1
- data/lib/appnigma/generated/models/platform_request_input_body.rb +1 -1
- data/lib/appnigma/generated/models/platform_request_output.rb +1 -1
- data/lib/appnigma/generated/models/ran_as.rb +1 -1
- data/lib/appnigma/generated/models/record_change.rb +231 -0
- data/lib/appnigma/generated/models/record_change_record.rb +105 -0
- data/lib/appnigma/generated/models/run_action_input.rb +1 -1
- data/lib/appnigma/generated/models/run_action_output.rb +1 -1
- data/lib/appnigma/generated/models/run_input.rb +1 -1
- data/lib/appnigma/generated/models/run_output.rb +1 -1
- data/lib/appnigma/generated/models/sdk_error.rb +1 -1
- data/lib/appnigma/generated/models/sdk_error_error.rb +3 -3
- data/lib/appnigma/generated/models/sdk_error_error_details.rb +81 -6
- data/lib/appnigma/generated/models/sdk_problem.rb +1 -1
- data/lib/appnigma/generated/models/set_alerts_input.rb +197 -0
- data/lib/appnigma/generated/models/set_alerts_output.rb +180 -0
- data/lib/appnigma/generated/models/set_sync_input.rb +177 -0
- data/lib/appnigma/generated/models/set_sync_output.rb +207 -0
- data/lib/appnigma/generated/models/switch_logic_off_input.rb +200 -0
- data/lib/appnigma/generated/models/switch_logic_off_output.rb +315 -0
- data/lib/appnigma/generated/models/switch_logic_on_input.rb +200 -0
- data/lib/appnigma/generated/models/switch_logic_on_output.rb +315 -0
- data/lib/appnigma/generated/models/sync_health.rb +231 -0
- data/lib/appnigma/generated/models/test_logic_input.rb +355 -0
- data/lib/appnigma/generated/models/test_logic_output.rb +418 -0
- data/lib/appnigma/generated/models/test_logic_output_error.rb +231 -0
- data/lib/appnigma/generated/models/update_logic_input.rb +359 -0
- data/lib/appnigma/generated/models/update_logic_output.rb +205 -0
- data/lib/appnigma/generated/version.rb +1 -1
- data/lib/appnigma/generated.rb +75 -1
- data/lib/appnigma/logic.rb +176 -0
- data/lib/appnigma/names.rb +4 -4
- data/lib/appnigma/platforms.rb +11 -1
- data/lib/appnigma/portal.rb +8 -5
- data/lib/appnigma/records.rb +46 -0
- data/lib/appnigma/schema_type.rb +149 -0
- data/lib/appnigma/sync.rb +30 -0
- data/lib/appnigma/types_printer.rb +154 -0
- data/lib/appnigma/verify_webhook.rb +107 -0
- data/lib/appnigma/version.rb +2 -2
- data/lib/appnigma/webhooks.rb +79 -0
- data/lib/appnigma.rb +1 -0
- metadata +93 -3
|
@@ -0,0 +1,346 @@
|
|
|
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 ClientWebhook < ApiModelBase
|
|
18
|
+
attr_accessor :webhook_id
|
|
19
|
+
|
|
20
|
+
# The address as kept, with https:// and the host in lower case
|
|
21
|
+
attr_accessor :url
|
|
22
|
+
|
|
23
|
+
# switched_off: every send to it failed for 3 days, so nothing more is sent. Delete it and create it again to start over.
|
|
24
|
+
attr_accessor :state
|
|
25
|
+
|
|
26
|
+
# ISO 8601, in UTC; null while active
|
|
27
|
+
attr_accessor :switched_off_at
|
|
28
|
+
|
|
29
|
+
# Why it was switched off; null while active
|
|
30
|
+
attr_accessor :switched_off_reason
|
|
31
|
+
|
|
32
|
+
# When the sends to it began failing, ISO 8601, in UTC; null when the last one got through
|
|
33
|
+
attr_accessor :failing_since
|
|
34
|
+
|
|
35
|
+
# When a send to it last got through, ISO 8601, in UTC
|
|
36
|
+
attr_accessor :last_delivered_at
|
|
37
|
+
|
|
38
|
+
# ISO 8601, in UTC
|
|
39
|
+
attr_accessor :created_at
|
|
40
|
+
|
|
41
|
+
class EnumAttributeValidator
|
|
42
|
+
attr_reader :datatype
|
|
43
|
+
attr_reader :allowable_values
|
|
44
|
+
|
|
45
|
+
def initialize(datatype, allowable_values)
|
|
46
|
+
@allowable_values = allowable_values.map do |value|
|
|
47
|
+
case datatype.to_s
|
|
48
|
+
when /Integer/i
|
|
49
|
+
value.to_i
|
|
50
|
+
when /Float/i
|
|
51
|
+
value.to_f
|
|
52
|
+
else
|
|
53
|
+
value
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def valid?(value)
|
|
59
|
+
!value || allowable_values.include?(value)
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
64
|
+
def self.attribute_map
|
|
65
|
+
{
|
|
66
|
+
:'webhook_id' => :'webhookId',
|
|
67
|
+
:'url' => :'url',
|
|
68
|
+
:'state' => :'state',
|
|
69
|
+
:'switched_off_at' => :'switchedOffAt',
|
|
70
|
+
:'switched_off_reason' => :'switchedOffReason',
|
|
71
|
+
:'failing_since' => :'failingSince',
|
|
72
|
+
:'last_delivered_at' => :'lastDeliveredAt',
|
|
73
|
+
:'created_at' => :'createdAt'
|
|
74
|
+
}
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Returns attribute mapping this model knows about
|
|
78
|
+
def self.acceptable_attribute_map
|
|
79
|
+
attribute_map
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Returns all the JSON keys this model knows about
|
|
83
|
+
def self.acceptable_attributes
|
|
84
|
+
acceptable_attribute_map.values
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Attribute type mapping.
|
|
88
|
+
def self.openapi_types
|
|
89
|
+
{
|
|
90
|
+
:'webhook_id' => :'String',
|
|
91
|
+
:'url' => :'String',
|
|
92
|
+
:'state' => :'String',
|
|
93
|
+
:'switched_off_at' => :'String',
|
|
94
|
+
:'switched_off_reason' => :'String',
|
|
95
|
+
:'failing_since' => :'String',
|
|
96
|
+
:'last_delivered_at' => :'String',
|
|
97
|
+
:'created_at' => :'String'
|
|
98
|
+
}
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# List of attributes with nullable: true
|
|
102
|
+
def self.openapi_nullable
|
|
103
|
+
Set.new([
|
|
104
|
+
:'switched_off_at',
|
|
105
|
+
:'switched_off_reason',
|
|
106
|
+
:'failing_since',
|
|
107
|
+
:'last_delivered_at',
|
|
108
|
+
])
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Returns attribute type mapping
|
|
112
|
+
def self.acceptable_openapi_types
|
|
113
|
+
openapi_types
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Returns the nullable attributes
|
|
117
|
+
def self.acceptable_openapi_nullable
|
|
118
|
+
openapi_nullable
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Initializes the object
|
|
122
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
123
|
+
def initialize(attributes = {})
|
|
124
|
+
if (!attributes.is_a?(Hash))
|
|
125
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::ClientWebhook` initialize method"
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
129
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
130
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
131
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
132
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::ClientWebhook`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
133
|
+
end
|
|
134
|
+
h[k.to_sym] = v
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if attributes.key?(:'webhook_id')
|
|
138
|
+
self.webhook_id = attributes[:'webhook_id']
|
|
139
|
+
else
|
|
140
|
+
self.webhook_id = nil
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if attributes.key?(:'url')
|
|
144
|
+
self.url = attributes[:'url']
|
|
145
|
+
else
|
|
146
|
+
self.url = nil
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if attributes.key?(:'state')
|
|
150
|
+
self.state = attributes[:'state']
|
|
151
|
+
else
|
|
152
|
+
self.state = nil
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if attributes.key?(:'switched_off_at')
|
|
156
|
+
self.switched_off_at = attributes[:'switched_off_at']
|
|
157
|
+
else
|
|
158
|
+
self.switched_off_at = nil
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if attributes.key?(:'switched_off_reason')
|
|
162
|
+
self.switched_off_reason = attributes[:'switched_off_reason']
|
|
163
|
+
else
|
|
164
|
+
self.switched_off_reason = nil
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
if attributes.key?(:'failing_since')
|
|
168
|
+
self.failing_since = attributes[:'failing_since']
|
|
169
|
+
else
|
|
170
|
+
self.failing_since = nil
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if attributes.key?(:'last_delivered_at')
|
|
174
|
+
self.last_delivered_at = attributes[:'last_delivered_at']
|
|
175
|
+
else
|
|
176
|
+
self.last_delivered_at = nil
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
if attributes.key?(:'created_at')
|
|
180
|
+
self.created_at = attributes[:'created_at']
|
|
181
|
+
else
|
|
182
|
+
self.created_at = nil
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
187
|
+
# @return Array for valid properties with the reasons
|
|
188
|
+
def list_invalid_properties
|
|
189
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
190
|
+
invalid_properties = Array.new
|
|
191
|
+
if @webhook_id.nil?
|
|
192
|
+
invalid_properties.push('invalid value for "webhook_id", webhook_id cannot be nil.')
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
if @url.nil?
|
|
196
|
+
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
if @state.nil?
|
|
200
|
+
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
if @created_at.nil?
|
|
204
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
invalid_properties
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Check to see if the all the properties in the model are valid
|
|
211
|
+
# @return true if the model is valid
|
|
212
|
+
def valid?
|
|
213
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
214
|
+
return false if @webhook_id.nil?
|
|
215
|
+
return false if @url.nil?
|
|
216
|
+
return false if @state.nil?
|
|
217
|
+
state_validator = EnumAttributeValidator.new('String', ["active", "switched_off"])
|
|
218
|
+
return false unless state_validator.valid?(@state)
|
|
219
|
+
switched_off_reason_validator = EnumAttributeValidator.new('String', ["deliveries_failing"])
|
|
220
|
+
return false unless switched_off_reason_validator.valid?(@switched_off_reason)
|
|
221
|
+
return false if @created_at.nil?
|
|
222
|
+
true
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Custom attribute writer method with validation
|
|
226
|
+
# @param [Object] webhook_id Value to be assigned
|
|
227
|
+
def webhook_id=(webhook_id)
|
|
228
|
+
if webhook_id.nil?
|
|
229
|
+
fail ArgumentError, 'webhook_id cannot be nil'
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
@webhook_id = webhook_id
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Custom attribute writer method with validation
|
|
236
|
+
# @param [Object] url Value to be assigned
|
|
237
|
+
def url=(url)
|
|
238
|
+
if url.nil?
|
|
239
|
+
fail ArgumentError, 'url cannot be nil'
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
@url = url
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
246
|
+
# @param [Object] state Object to be assigned
|
|
247
|
+
def state=(state)
|
|
248
|
+
validator = EnumAttributeValidator.new('String', ["active", "switched_off"])
|
|
249
|
+
unless validator.valid?(state)
|
|
250
|
+
fail ArgumentError, "invalid value for \"state\", must be one of #{validator.allowable_values}."
|
|
251
|
+
end
|
|
252
|
+
@state = state
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
256
|
+
# @param [Object] switched_off_reason Object to be assigned
|
|
257
|
+
def switched_off_reason=(switched_off_reason)
|
|
258
|
+
validator = EnumAttributeValidator.new('String', ["deliveries_failing"])
|
|
259
|
+
unless validator.valid?(switched_off_reason)
|
|
260
|
+
fail ArgumentError, "invalid value for \"switched_off_reason\", must be one of #{validator.allowable_values}."
|
|
261
|
+
end
|
|
262
|
+
@switched_off_reason = switched_off_reason
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# Custom attribute writer method with validation
|
|
266
|
+
# @param [Object] created_at Value to be assigned
|
|
267
|
+
def created_at=(created_at)
|
|
268
|
+
if created_at.nil?
|
|
269
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
@created_at = created_at
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
# Checks equality by comparing each attribute.
|
|
276
|
+
# @param [Object] Object to be compared
|
|
277
|
+
def ==(o)
|
|
278
|
+
return true if self.equal?(o)
|
|
279
|
+
self.class == o.class &&
|
|
280
|
+
webhook_id == o.webhook_id &&
|
|
281
|
+
url == o.url &&
|
|
282
|
+
state == o.state &&
|
|
283
|
+
switched_off_at == o.switched_off_at &&
|
|
284
|
+
switched_off_reason == o.switched_off_reason &&
|
|
285
|
+
failing_since == o.failing_since &&
|
|
286
|
+
last_delivered_at == o.last_delivered_at &&
|
|
287
|
+
created_at == o.created_at
|
|
288
|
+
end
|
|
289
|
+
|
|
290
|
+
# @see the `==` method
|
|
291
|
+
# @param [Object] Object to be compared
|
|
292
|
+
def eql?(o)
|
|
293
|
+
self == o
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Calculates hash code according to all attributes.
|
|
297
|
+
# @return [Integer] Hash code
|
|
298
|
+
def hash
|
|
299
|
+
[webhook_id, url, state, switched_off_at, switched_off_reason, failing_since, last_delivered_at, created_at].hash
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# Builds the object from hash
|
|
303
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
304
|
+
# @return [Object] Returns the model itself
|
|
305
|
+
def self.build_from_hash(attributes)
|
|
306
|
+
return nil unless attributes.is_a?(Hash)
|
|
307
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
308
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
309
|
+
map = acceptable_attribute_map
|
|
310
|
+
transformed_hash = {}
|
|
311
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
312
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
313
|
+
transformed_hash["#{key}"] = nil
|
|
314
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
315
|
+
# check to ensure the input is an array given that the attribute
|
|
316
|
+
# is documented as an array but the input is not
|
|
317
|
+
if attributes[map[key]].is_a?(Array)
|
|
318
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
319
|
+
end
|
|
320
|
+
elsif !attributes[map[key]].nil?
|
|
321
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
322
|
+
end
|
|
323
|
+
end
|
|
324
|
+
new(transformed_hash)
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
# Returns the object in the form of hash
|
|
328
|
+
# @return [Hash] Returns the object in the form of hash
|
|
329
|
+
def to_hash
|
|
330
|
+
hash = {}
|
|
331
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
332
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
333
|
+
value = self.send(attr)
|
|
334
|
+
if value.nil?
|
|
335
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
336
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
hash[param] = _to_hash(value)
|
|
340
|
+
end
|
|
341
|
+
hash
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
end
|
|
@@ -0,0 +1,243 @@
|
|
|
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 ConnectEndCustomerInput < ApiModelBase
|
|
18
|
+
# Your own id for the end customer: it must be 1 to 255 characters, with no control characters and not only spaces. Stored exactly as sent: ids that differ only in case or spaces are different end customers.
|
|
19
|
+
attr_accessor :end_customer_id
|
|
20
|
+
|
|
21
|
+
# The platform to connect, one whose connectionType is fields; it must be switched on for your company.
|
|
22
|
+
attr_accessor :platform
|
|
23
|
+
|
|
24
|
+
# What the end customer typed, encrypted as the operation's description says. Before encryption it is a JSON object keyed by each field's name in listPlatforms, such as host, username and apiKey. Every field listed is required, and no other is taken. Each value is text of at most 4096 characters; spaces around it are trimmed, and a host may be sent with or without https://. At most 10 fields.
|
|
25
|
+
attr_accessor :encrypted_fields
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'end_customer_id' => :'endCustomerId',
|
|
31
|
+
:'platform' => :'platform',
|
|
32
|
+
:'encrypted_fields' => :'encryptedFields'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns attribute mapping this model knows about
|
|
37
|
+
def self.acceptable_attribute_map
|
|
38
|
+
attribute_map
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
acceptable_attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'end_customer_id' => :'String',
|
|
50
|
+
:'platform' => :'String',
|
|
51
|
+
:'encrypted_fields' => :'EncryptedFields'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# List of attributes with nullable: true
|
|
56
|
+
def self.openapi_nullable
|
|
57
|
+
Set.new([
|
|
58
|
+
])
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Returns attribute type mapping
|
|
62
|
+
def self.acceptable_openapi_types
|
|
63
|
+
openapi_types
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Returns the nullable attributes
|
|
67
|
+
def self.acceptable_openapi_nullable
|
|
68
|
+
openapi_nullable
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Initializes the object
|
|
72
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
73
|
+
def initialize(attributes = {})
|
|
74
|
+
if (!attributes.is_a?(Hash))
|
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Appnigma::Generated::ConnectEndCustomerInput` initialize method"
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
79
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
80
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
81
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
82
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Appnigma::Generated::ConnectEndCustomerInput`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
83
|
+
end
|
|
84
|
+
h[k.to_sym] = v
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'end_customer_id')
|
|
88
|
+
self.end_customer_id = attributes[:'end_customer_id']
|
|
89
|
+
else
|
|
90
|
+
self.end_customer_id = nil
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'platform')
|
|
94
|
+
self.platform = attributes[:'platform']
|
|
95
|
+
else
|
|
96
|
+
self.platform = nil
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'encrypted_fields')
|
|
100
|
+
self.encrypted_fields = attributes[:'encrypted_fields']
|
|
101
|
+
else
|
|
102
|
+
self.encrypted_fields = nil
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
107
|
+
# @return Array for valid properties with the reasons
|
|
108
|
+
def list_invalid_properties
|
|
109
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
110
|
+
invalid_properties = Array.new
|
|
111
|
+
if @end_customer_id.nil?
|
|
112
|
+
invalid_properties.push('invalid value for "end_customer_id", end_customer_id cannot be nil.')
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if @platform.nil?
|
|
116
|
+
invalid_properties.push('invalid value for "platform", platform cannot be nil.')
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
|
|
120
|
+
if @platform !~ pattern
|
|
121
|
+
invalid_properties.push("invalid value for \"platform\", must conform to the pattern #{pattern}.")
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if @encrypted_fields.nil?
|
|
125
|
+
invalid_properties.push('invalid value for "encrypted_fields", encrypted_fields cannot be nil.')
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
invalid_properties
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Check to see if the all the properties in the model are valid
|
|
132
|
+
# @return true if the model is valid
|
|
133
|
+
def valid?
|
|
134
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
135
|
+
return false if @end_customer_id.nil?
|
|
136
|
+
return false if @platform.nil?
|
|
137
|
+
return false if @platform !~ Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
|
|
138
|
+
return false if @encrypted_fields.nil?
|
|
139
|
+
true
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Custom attribute writer method with validation
|
|
143
|
+
# @param [Object] end_customer_id Value to be assigned
|
|
144
|
+
def end_customer_id=(end_customer_id)
|
|
145
|
+
if end_customer_id.nil?
|
|
146
|
+
fail ArgumentError, 'end_customer_id cannot be nil'
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
@end_customer_id = end_customer_id
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Custom attribute writer method with validation
|
|
153
|
+
# @param [Object] platform Value to be assigned
|
|
154
|
+
def platform=(platform)
|
|
155
|
+
if platform.nil?
|
|
156
|
+
fail ArgumentError, 'platform cannot be nil'
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
pattern = Regexp.new(/^[a-z0-9]+(?:-[a-z0-9]+)*$/)
|
|
160
|
+
if platform !~ pattern
|
|
161
|
+
fail ArgumentError, "invalid value for \"platform\", must conform to the pattern #{pattern}."
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
@platform = platform
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Custom attribute writer method with validation
|
|
168
|
+
# @param [Object] encrypted_fields Value to be assigned
|
|
169
|
+
def encrypted_fields=(encrypted_fields)
|
|
170
|
+
if encrypted_fields.nil?
|
|
171
|
+
fail ArgumentError, 'encrypted_fields cannot be nil'
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
@encrypted_fields = encrypted_fields
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Checks equality by comparing each attribute.
|
|
178
|
+
# @param [Object] Object to be compared
|
|
179
|
+
def ==(o)
|
|
180
|
+
return true if self.equal?(o)
|
|
181
|
+
self.class == o.class &&
|
|
182
|
+
end_customer_id == o.end_customer_id &&
|
|
183
|
+
platform == o.platform &&
|
|
184
|
+
encrypted_fields == o.encrypted_fields
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# @see the `==` method
|
|
188
|
+
# @param [Object] Object to be compared
|
|
189
|
+
def eql?(o)
|
|
190
|
+
self == o
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Calculates hash code according to all attributes.
|
|
194
|
+
# @return [Integer] Hash code
|
|
195
|
+
def hash
|
|
196
|
+
[end_customer_id, platform, encrypted_fields].hash
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Builds the object from hash
|
|
200
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
201
|
+
# @return [Object] Returns the model itself
|
|
202
|
+
def self.build_from_hash(attributes)
|
|
203
|
+
return nil unless attributes.is_a?(Hash)
|
|
204
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
205
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
206
|
+
map = acceptable_attribute_map
|
|
207
|
+
transformed_hash = {}
|
|
208
|
+
acceptable_openapi_types.each_pair do |key, type|
|
|
209
|
+
if attributes.key?(map[key]) && attributes[map[key]].nil?
|
|
210
|
+
transformed_hash["#{key}"] = nil
|
|
211
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
212
|
+
# check to ensure the input is an array given that the attribute
|
|
213
|
+
# is documented as an array but the input is not
|
|
214
|
+
if attributes[map[key]].is_a?(Array)
|
|
215
|
+
transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
|
|
216
|
+
end
|
|
217
|
+
elsif !attributes[map[key]].nil?
|
|
218
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
new(transformed_hash)
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Returns the object in the form of hash
|
|
225
|
+
# @return [Hash] Returns the object in the form of hash
|
|
226
|
+
def to_hash
|
|
227
|
+
hash = {}
|
|
228
|
+
# include attributes inherited from allOf parents (the nearest declaration wins)
|
|
229
|
+
self.class.acceptable_attribute_map.each_pair do |attr, param|
|
|
230
|
+
value = self.send(attr)
|
|
231
|
+
if value.nil?
|
|
232
|
+
is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
|
|
233
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
hash[param] = _to_hash(value)
|
|
237
|
+
end
|
|
238
|
+
hash
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
end
|