pingram 0.1.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 +7 -0
- data/Gemfile +9 -0
- data/README.md +54 -0
- data/Rakefile +10 -0
- data/lib/pingram/api/account_api.rb +506 -0
- data/lib/pingram/api/addresses_api.rb +209 -0
- data/lib/pingram/api/components_api.rb +396 -0
- data/lib/pingram/api/default_api.rb +88 -0
- data/lib/pingram/api/domains_api.rb +204 -0
- data/lib/pingram/api/editor_api.rb +88 -0
- data/lib/pingram/api/environments_api.rb +215 -0
- data/lib/pingram/api/health_api.rb +77 -0
- data/lib/pingram/api/insights_api.rb +88 -0
- data/lib/pingram/api/keys_api.rb +204 -0
- data/lib/pingram/api/logs_api.rb +375 -0
- data/lib/pingram/api/members_api.rb +433 -0
- data/lib/pingram/api/sender_api.rb +221 -0
- data/lib/pingram/api/templates_api.rb +479 -0
- data/lib/pingram/api/types_api.rb +335 -0
- data/lib/pingram/api/user_api.rb +587 -0
- data/lib/pingram/api/users_api.rb +228 -0
- data/lib/pingram/api_client.rb +397 -0
- data/lib/pingram/api_error.rb +58 -0
- data/lib/pingram/api_model_base.rb +88 -0
- data/lib/pingram/client_wrapper.rb +212 -0
- data/lib/pingram/configuration.rb +330 -0
- data/lib/pingram/models/account_addresses_response.rb +166 -0
- data/lib/pingram/models/account_addresses_response_addresses_inner.rb +301 -0
- data/lib/pingram/models/account_get_response.rb +354 -0
- data/lib/pingram/models/account_get_response_pending_downgrade_usage_limit.rb +201 -0
- data/lib/pingram/models/address_response.rb +164 -0
- data/lib/pingram/models/auto_join_get_response.rb +192 -0
- data/lib/pingram/models/auto_join_post_response.rb +192 -0
- data/lib/pingram/models/auto_join_request_body.rb +166 -0
- data/lib/pingram/models/bee_token_v2.rb +190 -0
- data/lib/pingram/models/billing_post_request_body.rb +216 -0
- data/lib/pingram/models/billing_post_response_body.rb +367 -0
- data/lib/pingram/models/billing_post_response_body_pending_downgrade_usage_limit.rb +202 -0
- data/lib/pingram/models/channels_enum.rb +45 -0
- data/lib/pingram/models/create_account_request_body.rb +164 -0
- data/lib/pingram/models/create_account_response.rb +190 -0
- data/lib/pingram/models/create_address_request.rb +182 -0
- data/lib/pingram/models/create_key_request.rb +227 -0
- data/lib/pingram/models/create_key_response.rb +308 -0
- data/lib/pingram/models/delete_key_response.rb +165 -0
- data/lib/pingram/models/delete_user_response.rb +164 -0
- data/lib/pingram/models/email_auth_token_post_request.rb +147 -0
- data/lib/pingram/models/email_component_patch_request.rb +174 -0
- data/lib/pingram/models/email_component_post_request.rb +217 -0
- data/lib/pingram/models/email_component_response.rb +424 -0
- data/lib/pingram/models/email_component_response_referenced_by_inner.rb +238 -0
- data/lib/pingram/models/environment.rb +270 -0
- data/lib/pingram/models/environment_create_request.rb +164 -0
- data/lib/pingram/models/environment_patch_request.rb +176 -0
- data/lib/pingram/models/get_account_metadata_response.rb +164 -0
- data/lib/pingram/models/get_account_metadata_response_user_account_metadata.rb +216 -0
- data/lib/pingram/models/get_email_components_response_inner.rb +424 -0
- data/lib/pingram/models/get_environments_response_inner.rb +270 -0
- data/lib/pingram/models/get_inapp_notifications_response.rb +166 -0
- data/lib/pingram/models/get_inapp_notifications_response_notifications_inner.rb +389 -0
- data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options.rb +206 -0
- data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options_instant.rb +191 -0
- data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_delivery_options_off.rb +164 -0
- data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_replies_inner.rb +190 -0
- data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_template.rb +103 -0
- data/lib/pingram/models/get_inapp_notifications_response_notifications_inner_template_any_of.rb +301 -0
- data/lib/pingram/models/get_keys_response.rb +168 -0
- data/lib/pingram/models/get_keys_response_keys_inner.rb +371 -0
- data/lib/pingram/models/get_logs_response.rb +175 -0
- data/lib/pingram/models/get_logs_response_messages_inner.rb +419 -0
- data/lib/pingram/models/get_logs_response_messages_inner_attachments_inner.rb +225 -0
- data/lib/pingram/models/get_members_response_inner.rb +236 -0
- data/lib/pingram/models/get_metrics_response_inner.rb +238 -0
- data/lib/pingram/models/get_metrics_response_inner_messages_inner.rb +159 -0
- data/lib/pingram/models/get_notifications_response_inner.rb +317 -0
- data/lib/pingram/models/get_notifications_response_inner_deduplication.rb +164 -0
- data/lib/pingram/models/get_notifications_response_inner_options.rb +201 -0
- data/lib/pingram/models/get_notifications_response_inner_options_email.rb +242 -0
- data/lib/pingram/models/get_notifications_response_inner_options_email_daily.rb +173 -0
- data/lib/pingram/models/get_notifications_response_inner_options_email_monthly.rb +216 -0
- data/lib/pingram/models/get_notifications_response_inner_options_email_weekly.rb +182 -0
- data/lib/pingram/models/get_notifications_response_inner_templates_inner.rb +214 -0
- data/lib/pingram/models/get_notifications_response_inner_throttling.rb +294 -0
- data/lib/pingram/models/get_senders_response_inner.rb +342 -0
- data/lib/pingram/models/get_templates_response.rb +103 -0
- data/lib/pingram/models/get_users_response.rb +201 -0
- data/lib/pingram/models/get_users_response_users_inner.rb +268 -0
- data/lib/pingram/models/get_users_response_users_inner_email_suppression_status.rb +214 -0
- data/lib/pingram/models/get_users_response_users_inner_push_tokens_inner.rb +252 -0
- data/lib/pingram/models/get_users_response_users_inner_push_tokens_inner_device.rb +209 -0
- data/lib/pingram/models/get_users_response_users_inner_slack_token.rb +317 -0
- data/lib/pingram/models/get_users_response_users_inner_slack_token_authed_user.rb +192 -0
- data/lib/pingram/models/get_users_response_users_inner_slack_token_enterprise.rb +156 -0
- data/lib/pingram/models/get_users_response_users_inner_slack_token_incoming_webhook.rb +174 -0
- data/lib/pingram/models/get_users_response_users_inner_slack_token_response_metadata.rb +200 -0
- data/lib/pingram/models/get_users_response_users_inner_web_push_tokens_inner.rb +164 -0
- data/lib/pingram/models/get_users_response_users_inner_web_push_tokens_inner_sub.rb +191 -0
- data/lib/pingram/models/get_users_response_users_inner_web_push_tokens_inner_sub_keys.rb +190 -0
- data/lib/pingram/models/in_app_notification_patch_request.rb +231 -0
- data/lib/pingram/models/in_app_notification_unread_clear_request.rb +156 -0
- data/lib/pingram/models/inapp_unread_count_response.rb +164 -0
- data/lib/pingram/models/inbound_request_body.rb +103 -0
- data/lib/pingram/models/inbound_response_body.rb +216 -0
- data/lib/pingram/models/inbound_response_body_results_inner.rb +216 -0
- data/lib/pingram/models/ingishts_post_request.rb +288 -0
- data/lib/pingram/models/ingishts_post_request_label_options.rb +147 -0
- data/lib/pingram/models/ingishts_post_request_metric_data_queries_inner.rb +208 -0
- data/lib/pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat.rb +211 -0
- data/lib/pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat_metric.rb +171 -0
- data/lib/pingram/models/ingishts_post_request_metric_data_queries_inner_metric_stat_metric_dimensions_inner.rb +159 -0
- data/lib/pingram/models/intercom_webhook.rb +293 -0
- data/lib/pingram/models/intercom_webhook_data.rb +164 -0
- data/lib/pingram/models/intercom_webhook_data_item.rb +103 -0
- data/lib/pingram/models/intercom_webhook_data_item_any_of.rb +453 -0
- data/lib/pingram/models/intercom_webhook_data_item_any_of_contacts.rb +216 -0
- data/lib/pingram/models/intercom_webhook_data_item_any_of_contacts_contacts_inner.rb +199 -0
- data/lib/pingram/models/intercom_webhook_data_item_any_of_source.rb +260 -0
- data/lib/pingram/models/intercom_webhook_data_item_any_of_source_author.rb +208 -0
- data/lib/pingram/models/invite_post_response.rb +156 -0
- data/lib/pingram/models/log_query_post_body.rb +251 -0
- data/lib/pingram/models/logs_bulk_request.rb +167 -0
- data/lib/pingram/models/logs_get_response.rb +167 -0
- data/lib/pingram/models/logs_get_response_logs_inner.rb +1808 -0
- data/lib/pingram/models/logs_query_response.rb +165 -0
- data/lib/pingram/models/logs_query_result_response.rb +194 -0
- data/lib/pingram/models/logs_retention_response.rb +165 -0
- data/lib/pingram/models/logs_tail_response.rb +167 -0
- data/lib/pingram/models/member_invite_request.rb +173 -0
- data/lib/pingram/models/member_update_request.rb +164 -0
- data/lib/pingram/models/message_response.rb +164 -0
- data/lib/pingram/models/notification.rb +317 -0
- data/lib/pingram/models/notification_create_request.rb +227 -0
- data/lib/pingram/models/notification_patch_request.rb +203 -0
- data/lib/pingram/models/post_email_test_request.rb +303 -0
- data/lib/pingram/models/post_email_test_response.rb +175 -0
- data/lib/pingram/models/post_senders_request_body.rb +164 -0
- data/lib/pingram/models/post_user_request.rb +215 -0
- data/lib/pingram/models/sender_post_body.rb +324 -0
- data/lib/pingram/models/sender_post_body_email.rb +217 -0
- data/lib/pingram/models/sender_post_body_inapp.rb +182 -0
- data/lib/pingram/models/sender_post_body_mobile_push.rb +190 -0
- data/lib/pingram/models/sender_post_body_options.rb +165 -0
- data/lib/pingram/models/sender_post_body_options_apn.rb +201 -0
- data/lib/pingram/models/sender_post_body_options_email.rb +209 -0
- data/lib/pingram/models/sender_post_body_options_email_attachments_inner.rb +103 -0
- data/lib/pingram/models/sender_post_body_options_email_attachments_inner_any_of.rb +190 -0
- data/lib/pingram/models/sender_post_body_options_email_attachments_inner_any_of1.rb +199 -0
- data/lib/pingram/models/sender_post_body_options_fcm.rb +147 -0
- data/lib/pingram/models/sender_post_body_options_fcm_android.rb +208 -0
- data/lib/pingram/models/sender_post_body_slack.rb +299 -0
- data/lib/pingram/models/sender_post_body_slack_metadata.rb +173 -0
- data/lib/pingram/models/sender_post_body_slack_metadata_entities_inner.rb +257 -0
- data/lib/pingram/models/sender_post_body_slack_metadata_entities_inner_external_ref.rb +174 -0
- data/lib/pingram/models/sender_post_body_sms.rb +156 -0
- data/lib/pingram/models/sender_post_body_sms_auto_reply.rb +164 -0
- data/lib/pingram/models/sender_post_body_to.rb +251 -0
- data/lib/pingram/models/sender_post_body_user.rb +268 -0
- data/lib/pingram/models/sender_post_body_web_push.rb +208 -0
- data/lib/pingram/models/sender_post_response.rb +192 -0
- data/lib/pingram/models/set_default_template_request.rb +204 -0
- data/lib/pingram/models/slack_interactivity_response.rb +165 -0
- data/lib/pingram/models/slack_oauth_request.rb +190 -0
- data/lib/pingram/models/success_response.rb +164 -0
- data/lib/pingram/models/supabase_configure_request.rb +242 -0
- data/lib/pingram/models/supabase_configure_response.rb +173 -0
- data/lib/pingram/models/supabase_o_auth_request.rb +216 -0
- data/lib/pingram/models/supabase_o_auth_response.rb +173 -0
- data/lib/pingram/models/supabase_projects_response.rb +166 -0
- data/lib/pingram/models/supabase_projects_response_projects_inner.rb +268 -0
- data/lib/pingram/models/supabase_status_response.rb +208 -0
- data/lib/pingram/models/template.rb +301 -0
- data/lib/pingram/models/template_patch_request.rb +104 -0
- data/lib/pingram/models/template_patch_request_any_of.rb +199 -0
- data/lib/pingram/models/template_patch_request_any_of1.rb +187 -0
- data/lib/pingram/models/template_patch_request_any_of1_batch.rb +217 -0
- data/lib/pingram/models/template_patch_request_any_of1_instant.rb +184 -0
- data/lib/pingram/models/template_post_request.rb +346 -0
- data/lib/pingram/models/template_post_request_batch.rb +217 -0
- data/lib/pingram/models/template_post_request_instant.rb +183 -0
- data/lib/pingram/models/update_address_request.rb +182 -0
- data/lib/pingram/models/user.rb +268 -0
- data/lib/pingram/models/user_suppression_delete_response.rb +164 -0
- data/lib/pingram/models/webhook_response.rb +182 -0
- data/lib/pingram/version.rb +15 -0
- data/lib/pingram.rb +215 -0
- data/pingram.gemspec +38 -0
- metadata +270 -0
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#NotificationAPI
|
|
3
|
+
|
|
4
|
+
#Internal API for notification delivery and management
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Pingram
|
|
17
|
+
class EmailComponentResponse < ApiModelBase
|
|
18
|
+
attr_accessor :env_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :component_id
|
|
21
|
+
|
|
22
|
+
attr_accessor :name
|
|
23
|
+
|
|
24
|
+
attr_accessor :internal
|
|
25
|
+
|
|
26
|
+
attr_accessor :internal_page
|
|
27
|
+
|
|
28
|
+
attr_accessor :html
|
|
29
|
+
|
|
30
|
+
attr_accessor :created_at
|
|
31
|
+
|
|
32
|
+
attr_accessor :modified_at
|
|
33
|
+
|
|
34
|
+
attr_accessor :referenced_by
|
|
35
|
+
|
|
36
|
+
attr_accessor :channel
|
|
37
|
+
|
|
38
|
+
class EnumAttributeValidator
|
|
39
|
+
attr_reader :datatype
|
|
40
|
+
attr_reader :allowable_values
|
|
41
|
+
|
|
42
|
+
def initialize(datatype, allowable_values)
|
|
43
|
+
@allowable_values = allowable_values.map do |value|
|
|
44
|
+
case datatype.to_s
|
|
45
|
+
when /Integer/i
|
|
46
|
+
value.to_i
|
|
47
|
+
when /Float/i
|
|
48
|
+
value.to_f
|
|
49
|
+
else
|
|
50
|
+
value
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def valid?(value)
|
|
56
|
+
!value || allowable_values.include?(value)
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
61
|
+
def self.attribute_map
|
|
62
|
+
{
|
|
63
|
+
:'env_id' => :'envId',
|
|
64
|
+
:'component_id' => :'componentId',
|
|
65
|
+
:'name' => :'name',
|
|
66
|
+
:'internal' => :'internal',
|
|
67
|
+
:'internal_page' => :'internalPage',
|
|
68
|
+
:'html' => :'html',
|
|
69
|
+
:'created_at' => :'createdAt',
|
|
70
|
+
:'modified_at' => :'modifiedAt',
|
|
71
|
+
:'referenced_by' => :'referencedBy',
|
|
72
|
+
:'channel' => :'channel'
|
|
73
|
+
}
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Returns attribute mapping this model knows about
|
|
77
|
+
def self.acceptable_attribute_map
|
|
78
|
+
attribute_map
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Returns all the JSON keys this model knows about
|
|
82
|
+
def self.acceptable_attributes
|
|
83
|
+
acceptable_attribute_map.values
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Attribute type mapping.
|
|
87
|
+
def self.openapi_types
|
|
88
|
+
{
|
|
89
|
+
:'env_id' => :'String',
|
|
90
|
+
:'component_id' => :'String',
|
|
91
|
+
:'name' => :'String',
|
|
92
|
+
:'internal' => :'String',
|
|
93
|
+
:'internal_page' => :'String',
|
|
94
|
+
:'html' => :'String',
|
|
95
|
+
:'created_at' => :'String',
|
|
96
|
+
:'modified_at' => :'String',
|
|
97
|
+
:'referenced_by' => :'Array<EmailComponentResponseReferencedByInner>',
|
|
98
|
+
:'channel' => :'String'
|
|
99
|
+
}
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# List of attributes with nullable: true
|
|
103
|
+
def self.openapi_nullable
|
|
104
|
+
Set.new([
|
|
105
|
+
])
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Initializes the object
|
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
110
|
+
def initialize(attributes = {})
|
|
111
|
+
if (!attributes.is_a?(Hash))
|
|
112
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::EmailComponentResponse` initialize method"
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
116
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
117
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
118
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
119
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::EmailComponentResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
120
|
+
end
|
|
121
|
+
h[k.to_sym] = v
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if attributes.key?(:'env_id')
|
|
125
|
+
self.env_id = attributes[:'env_id']
|
|
126
|
+
else
|
|
127
|
+
self.env_id = nil
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if attributes.key?(:'component_id')
|
|
131
|
+
self.component_id = attributes[:'component_id']
|
|
132
|
+
else
|
|
133
|
+
self.component_id = nil
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if attributes.key?(:'name')
|
|
137
|
+
self.name = attributes[:'name']
|
|
138
|
+
else
|
|
139
|
+
self.name = nil
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if attributes.key?(:'internal')
|
|
143
|
+
self.internal = attributes[:'internal']
|
|
144
|
+
else
|
|
145
|
+
self.internal = nil
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if attributes.key?(:'internal_page')
|
|
149
|
+
self.internal_page = attributes[:'internal_page']
|
|
150
|
+
else
|
|
151
|
+
self.internal_page = nil
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
if attributes.key?(:'html')
|
|
155
|
+
self.html = attributes[:'html']
|
|
156
|
+
else
|
|
157
|
+
self.html = nil
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if attributes.key?(:'created_at')
|
|
161
|
+
self.created_at = attributes[:'created_at']
|
|
162
|
+
else
|
|
163
|
+
self.created_at = nil
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if attributes.key?(:'modified_at')
|
|
167
|
+
self.modified_at = attributes[:'modified_at']
|
|
168
|
+
else
|
|
169
|
+
self.modified_at = nil
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if attributes.key?(:'referenced_by')
|
|
173
|
+
if (value = attributes[:'referenced_by']).is_a?(Array)
|
|
174
|
+
self.referenced_by = value
|
|
175
|
+
end
|
|
176
|
+
else
|
|
177
|
+
self.referenced_by = nil
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if attributes.key?(:'channel')
|
|
181
|
+
self.channel = attributes[:'channel']
|
|
182
|
+
else
|
|
183
|
+
self.channel = nil
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
188
|
+
# @return Array for valid properties with the reasons
|
|
189
|
+
def list_invalid_properties
|
|
190
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
191
|
+
invalid_properties = Array.new
|
|
192
|
+
if @env_id.nil?
|
|
193
|
+
invalid_properties.push('invalid value for "env_id", env_id cannot be nil.')
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
if @component_id.nil?
|
|
197
|
+
invalid_properties.push('invalid value for "component_id", component_id cannot be nil.')
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
if @name.nil?
|
|
201
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
if @internal.nil?
|
|
205
|
+
invalid_properties.push('invalid value for "internal", internal cannot be nil.')
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
if @internal_page.nil?
|
|
209
|
+
invalid_properties.push('invalid value for "internal_page", internal_page cannot be nil.')
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
if @html.nil?
|
|
213
|
+
invalid_properties.push('invalid value for "html", html cannot be nil.')
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
if @created_at.nil?
|
|
217
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
if @modified_at.nil?
|
|
221
|
+
invalid_properties.push('invalid value for "modified_at", modified_at cannot be nil.')
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
if @referenced_by.nil?
|
|
225
|
+
invalid_properties.push('invalid value for "referenced_by", referenced_by cannot be nil.')
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
if @channel.nil?
|
|
229
|
+
invalid_properties.push('invalid value for "channel", channel cannot be nil.')
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
invalid_properties
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Check to see if the all the properties in the model are valid
|
|
236
|
+
# @return true if the model is valid
|
|
237
|
+
def valid?
|
|
238
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
239
|
+
return false if @env_id.nil?
|
|
240
|
+
return false if @component_id.nil?
|
|
241
|
+
return false if @name.nil?
|
|
242
|
+
return false if @internal.nil?
|
|
243
|
+
return false if @internal_page.nil?
|
|
244
|
+
return false if @html.nil?
|
|
245
|
+
return false if @created_at.nil?
|
|
246
|
+
return false if @modified_at.nil?
|
|
247
|
+
return false if @referenced_by.nil?
|
|
248
|
+
return false if @channel.nil?
|
|
249
|
+
channel_validator = EnumAttributeValidator.new('String', ["EMAIL"])
|
|
250
|
+
return false unless channel_validator.valid?(@channel)
|
|
251
|
+
true
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# Custom attribute writer method with validation
|
|
255
|
+
# @param [Object] env_id Value to be assigned
|
|
256
|
+
def env_id=(env_id)
|
|
257
|
+
if env_id.nil?
|
|
258
|
+
fail ArgumentError, 'env_id cannot be nil'
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
@env_id = env_id
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
# Custom attribute writer method with validation
|
|
265
|
+
# @param [Object] component_id Value to be assigned
|
|
266
|
+
def component_id=(component_id)
|
|
267
|
+
if component_id.nil?
|
|
268
|
+
fail ArgumentError, 'component_id cannot be nil'
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
@component_id = component_id
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
# Custom attribute writer method with validation
|
|
275
|
+
# @param [Object] name Value to be assigned
|
|
276
|
+
def name=(name)
|
|
277
|
+
if name.nil?
|
|
278
|
+
fail ArgumentError, 'name cannot be nil'
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
@name = name
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
# Custom attribute writer method with validation
|
|
285
|
+
# @param [Object] internal Value to be assigned
|
|
286
|
+
def internal=(internal)
|
|
287
|
+
if internal.nil?
|
|
288
|
+
fail ArgumentError, 'internal cannot be nil'
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
@internal = internal
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
# Custom attribute writer method with validation
|
|
295
|
+
# @param [Object] internal_page Value to be assigned
|
|
296
|
+
def internal_page=(internal_page)
|
|
297
|
+
if internal_page.nil?
|
|
298
|
+
fail ArgumentError, 'internal_page cannot be nil'
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
@internal_page = internal_page
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
# Custom attribute writer method with validation
|
|
305
|
+
# @param [Object] html Value to be assigned
|
|
306
|
+
def html=(html)
|
|
307
|
+
if html.nil?
|
|
308
|
+
fail ArgumentError, 'html cannot be nil'
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
@html = html
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
# Custom attribute writer method with validation
|
|
315
|
+
# @param [Object] created_at Value to be assigned
|
|
316
|
+
def created_at=(created_at)
|
|
317
|
+
if created_at.nil?
|
|
318
|
+
fail ArgumentError, 'created_at cannot be nil'
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
@created_at = created_at
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# Custom attribute writer method with validation
|
|
325
|
+
# @param [Object] modified_at Value to be assigned
|
|
326
|
+
def modified_at=(modified_at)
|
|
327
|
+
if modified_at.nil?
|
|
328
|
+
fail ArgumentError, 'modified_at cannot be nil'
|
|
329
|
+
end
|
|
330
|
+
|
|
331
|
+
@modified_at = modified_at
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
# Custom attribute writer method with validation
|
|
335
|
+
# @param [Object] referenced_by Value to be assigned
|
|
336
|
+
def referenced_by=(referenced_by)
|
|
337
|
+
if referenced_by.nil?
|
|
338
|
+
fail ArgumentError, 'referenced_by cannot be nil'
|
|
339
|
+
end
|
|
340
|
+
|
|
341
|
+
@referenced_by = referenced_by
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
345
|
+
# @param [Object] channel Object to be assigned
|
|
346
|
+
def channel=(channel)
|
|
347
|
+
validator = EnumAttributeValidator.new('String', ["EMAIL"])
|
|
348
|
+
unless validator.valid?(channel)
|
|
349
|
+
fail ArgumentError, "invalid value for \"channel\", must be one of #{validator.allowable_values}."
|
|
350
|
+
end
|
|
351
|
+
@channel = channel
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
# Checks equality by comparing each attribute.
|
|
355
|
+
# @param [Object] Object to be compared
|
|
356
|
+
def ==(o)
|
|
357
|
+
return true if self.equal?(o)
|
|
358
|
+
self.class == o.class &&
|
|
359
|
+
env_id == o.env_id &&
|
|
360
|
+
component_id == o.component_id &&
|
|
361
|
+
name == o.name &&
|
|
362
|
+
internal == o.internal &&
|
|
363
|
+
internal_page == o.internal_page &&
|
|
364
|
+
html == o.html &&
|
|
365
|
+
created_at == o.created_at &&
|
|
366
|
+
modified_at == o.modified_at &&
|
|
367
|
+
referenced_by == o.referenced_by &&
|
|
368
|
+
channel == o.channel
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
# @see the `==` method
|
|
372
|
+
# @param [Object] Object to be compared
|
|
373
|
+
def eql?(o)
|
|
374
|
+
self == o
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
# Calculates hash code according to all attributes.
|
|
378
|
+
# @return [Integer] Hash code
|
|
379
|
+
def hash
|
|
380
|
+
[env_id, component_id, name, internal, internal_page, html, created_at, modified_at, referenced_by, channel].hash
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
# Builds the object from hash
|
|
384
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
385
|
+
# @return [Object] Returns the model itself
|
|
386
|
+
def self.build_from_hash(attributes)
|
|
387
|
+
return nil unless attributes.is_a?(Hash)
|
|
388
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
389
|
+
transformed_hash = {}
|
|
390
|
+
openapi_types.each_pair do |key, type|
|
|
391
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
392
|
+
transformed_hash["#{key}"] = nil
|
|
393
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
394
|
+
# check to ensure the input is an array given that the attribute
|
|
395
|
+
# is documented as an array but the input is not
|
|
396
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
397
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
398
|
+
end
|
|
399
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
400
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
401
|
+
end
|
|
402
|
+
end
|
|
403
|
+
new(transformed_hash)
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
# Returns the object in the form of hash
|
|
407
|
+
# @return [Hash] Returns the object in the form of hash
|
|
408
|
+
def to_hash
|
|
409
|
+
hash = {}
|
|
410
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
411
|
+
value = self.send(attr)
|
|
412
|
+
if value.nil?
|
|
413
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
414
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
hash[param] = _to_hash(value)
|
|
418
|
+
end
|
|
419
|
+
hash
|
|
420
|
+
end
|
|
421
|
+
|
|
422
|
+
end
|
|
423
|
+
|
|
424
|
+
end
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#NotificationAPI
|
|
3
|
+
|
|
4
|
+
#Internal API for notification delivery and management
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Pingram
|
|
17
|
+
class EmailComponentResponseReferencedByInner < ApiModelBase
|
|
18
|
+
attr_accessor :notification_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :channel
|
|
21
|
+
|
|
22
|
+
attr_accessor :template_id
|
|
23
|
+
|
|
24
|
+
class EnumAttributeValidator
|
|
25
|
+
attr_reader :datatype
|
|
26
|
+
attr_reader :allowable_values
|
|
27
|
+
|
|
28
|
+
def initialize(datatype, allowable_values)
|
|
29
|
+
@allowable_values = allowable_values.map do |value|
|
|
30
|
+
case datatype.to_s
|
|
31
|
+
when /Integer/i
|
|
32
|
+
value.to_i
|
|
33
|
+
when /Float/i
|
|
34
|
+
value.to_f
|
|
35
|
+
else
|
|
36
|
+
value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def valid?(value)
|
|
42
|
+
!value || allowable_values.include?(value)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
47
|
+
def self.attribute_map
|
|
48
|
+
{
|
|
49
|
+
:'notification_id' => :'notificationId',
|
|
50
|
+
:'channel' => :'channel',
|
|
51
|
+
:'template_id' => :'templateId'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Returns attribute mapping this model knows about
|
|
56
|
+
def self.acceptable_attribute_map
|
|
57
|
+
attribute_map
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Returns all the JSON keys this model knows about
|
|
61
|
+
def self.acceptable_attributes
|
|
62
|
+
acceptable_attribute_map.values
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Attribute type mapping.
|
|
66
|
+
def self.openapi_types
|
|
67
|
+
{
|
|
68
|
+
:'notification_id' => :'String',
|
|
69
|
+
:'channel' => :'ChannelsEnum',
|
|
70
|
+
:'template_id' => :'String'
|
|
71
|
+
}
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# List of attributes with nullable: true
|
|
75
|
+
def self.openapi_nullable
|
|
76
|
+
Set.new([
|
|
77
|
+
])
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Initializes the object
|
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
82
|
+
def initialize(attributes = {})
|
|
83
|
+
if (!attributes.is_a?(Hash))
|
|
84
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::EmailComponentResponseReferencedByInner` initialize method"
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
88
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
89
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
90
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
91
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::EmailComponentResponseReferencedByInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
92
|
+
end
|
|
93
|
+
h[k.to_sym] = v
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'notification_id')
|
|
97
|
+
self.notification_id = attributes[:'notification_id']
|
|
98
|
+
else
|
|
99
|
+
self.notification_id = nil
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'channel')
|
|
103
|
+
self.channel = attributes[:'channel']
|
|
104
|
+
else
|
|
105
|
+
self.channel = nil
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'template_id')
|
|
109
|
+
self.template_id = attributes[:'template_id']
|
|
110
|
+
else
|
|
111
|
+
self.template_id = nil
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
116
|
+
# @return Array for valid properties with the reasons
|
|
117
|
+
def list_invalid_properties
|
|
118
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
119
|
+
invalid_properties = Array.new
|
|
120
|
+
if @notification_id.nil?
|
|
121
|
+
invalid_properties.push('invalid value for "notification_id", notification_id cannot be nil.')
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if @channel.nil?
|
|
125
|
+
invalid_properties.push('invalid value for "channel", channel cannot be nil.')
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if @template_id.nil?
|
|
129
|
+
invalid_properties.push('invalid value for "template_id", template_id cannot be nil.')
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
invalid_properties
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Check to see if the all the properties in the model are valid
|
|
136
|
+
# @return true if the model is valid
|
|
137
|
+
def valid?
|
|
138
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
139
|
+
return false if @notification_id.nil?
|
|
140
|
+
return false if @channel.nil?
|
|
141
|
+
return false if @template_id.nil?
|
|
142
|
+
true
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Custom attribute writer method with validation
|
|
146
|
+
# @param [Object] notification_id Value to be assigned
|
|
147
|
+
def notification_id=(notification_id)
|
|
148
|
+
if notification_id.nil?
|
|
149
|
+
fail ArgumentError, 'notification_id cannot be nil'
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
@notification_id = notification_id
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Custom attribute writer method with validation
|
|
156
|
+
# @param [Object] channel Value to be assigned
|
|
157
|
+
def channel=(channel)
|
|
158
|
+
if channel.nil?
|
|
159
|
+
fail ArgumentError, 'channel cannot be nil'
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
@channel = channel
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Custom attribute writer method with validation
|
|
166
|
+
# @param [Object] template_id Value to be assigned
|
|
167
|
+
def template_id=(template_id)
|
|
168
|
+
if template_id.nil?
|
|
169
|
+
fail ArgumentError, 'template_id cannot be nil'
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
@template_id = template_id
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Checks equality by comparing each attribute.
|
|
176
|
+
# @param [Object] Object to be compared
|
|
177
|
+
def ==(o)
|
|
178
|
+
return true if self.equal?(o)
|
|
179
|
+
self.class == o.class &&
|
|
180
|
+
notification_id == o.notification_id &&
|
|
181
|
+
channel == o.channel &&
|
|
182
|
+
template_id == o.template_id
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# @see the `==` method
|
|
186
|
+
# @param [Object] Object to be compared
|
|
187
|
+
def eql?(o)
|
|
188
|
+
self == o
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Calculates hash code according to all attributes.
|
|
192
|
+
# @return [Integer] Hash code
|
|
193
|
+
def hash
|
|
194
|
+
[notification_id, channel, template_id].hash
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# Builds the object from hash
|
|
198
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
199
|
+
# @return [Object] Returns the model itself
|
|
200
|
+
def self.build_from_hash(attributes)
|
|
201
|
+
return nil unless attributes.is_a?(Hash)
|
|
202
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
203
|
+
transformed_hash = {}
|
|
204
|
+
openapi_types.each_pair do |key, type|
|
|
205
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
206
|
+
transformed_hash["#{key}"] = nil
|
|
207
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
208
|
+
# check to ensure the input is an array given that the attribute
|
|
209
|
+
# is documented as an array but the input is not
|
|
210
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
211
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
212
|
+
end
|
|
213
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
214
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
new(transformed_hash)
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Returns the object in the form of hash
|
|
221
|
+
# @return [Hash] Returns the object in the form of hash
|
|
222
|
+
def to_hash
|
|
223
|
+
hash = {}
|
|
224
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
225
|
+
value = self.send(attr)
|
|
226
|
+
if value.nil?
|
|
227
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
228
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
hash[param] = _to_hash(value)
|
|
232
|
+
end
|
|
233
|
+
hash
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
end
|