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,166 @@
|
|
|
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 GetInappNotificationsResponse < ApiModelBase
|
|
18
|
+
attr_accessor :notifications
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'notifications' => :'notifications'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Returns attribute mapping this model knows about
|
|
28
|
+
def self.acceptable_attribute_map
|
|
29
|
+
attribute_map
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
acceptable_attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'notifications' => :'Array<GetInappNotificationsResponseNotificationsInner>'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# List of attributes with nullable: true
|
|
45
|
+
def self.openapi_nullable
|
|
46
|
+
Set.new([
|
|
47
|
+
])
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
if (!attributes.is_a?(Hash))
|
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::GetInappNotificationsResponse` initialize method"
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
58
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::GetInappNotificationsResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'notifications')
|
|
67
|
+
if (value = attributes[:'notifications']).is_a?(Array)
|
|
68
|
+
self.notifications = value
|
|
69
|
+
end
|
|
70
|
+
else
|
|
71
|
+
self.notifications = nil
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
76
|
+
# @return Array for valid properties with the reasons
|
|
77
|
+
def list_invalid_properties
|
|
78
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
79
|
+
invalid_properties = Array.new
|
|
80
|
+
if @notifications.nil?
|
|
81
|
+
invalid_properties.push('invalid value for "notifications", notifications cannot be nil.')
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
invalid_properties
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Check to see if the all the properties in the model are valid
|
|
88
|
+
# @return true if the model is valid
|
|
89
|
+
def valid?
|
|
90
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
91
|
+
return false if @notifications.nil?
|
|
92
|
+
true
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Custom attribute writer method with validation
|
|
96
|
+
# @param [Object] notifications Value to be assigned
|
|
97
|
+
def notifications=(notifications)
|
|
98
|
+
if notifications.nil?
|
|
99
|
+
fail ArgumentError, 'notifications cannot be nil'
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
@notifications = notifications
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Checks equality by comparing each attribute.
|
|
106
|
+
# @param [Object] Object to be compared
|
|
107
|
+
def ==(o)
|
|
108
|
+
return true if self.equal?(o)
|
|
109
|
+
self.class == o.class &&
|
|
110
|
+
notifications == o.notifications
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# @see the `==` method
|
|
114
|
+
# @param [Object] Object to be compared
|
|
115
|
+
def eql?(o)
|
|
116
|
+
self == o
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Calculates hash code according to all attributes.
|
|
120
|
+
# @return [Integer] Hash code
|
|
121
|
+
def hash
|
|
122
|
+
[notifications].hash
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Builds the object from hash
|
|
126
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
127
|
+
# @return [Object] Returns the model itself
|
|
128
|
+
def self.build_from_hash(attributes)
|
|
129
|
+
return nil unless attributes.is_a?(Hash)
|
|
130
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
131
|
+
transformed_hash = {}
|
|
132
|
+
openapi_types.each_pair do |key, type|
|
|
133
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
134
|
+
transformed_hash["#{key}"] = nil
|
|
135
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
136
|
+
# check to ensure the input is an array given that the attribute
|
|
137
|
+
# is documented as an array but the input is not
|
|
138
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
139
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
140
|
+
end
|
|
141
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
142
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
new(transformed_hash)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Returns the object in the form of hash
|
|
149
|
+
# @return [Hash] Returns the object in the form of hash
|
|
150
|
+
def to_hash
|
|
151
|
+
hash = {}
|
|
152
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
153
|
+
value = self.send(attr)
|
|
154
|
+
if value.nil?
|
|
155
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
156
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
hash[param] = _to_hash(value)
|
|
160
|
+
end
|
|
161
|
+
hash
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
end
|
|
@@ -0,0 +1,389 @@
|
|
|
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 GetInappNotificationsResponseNotificationsInner < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
attr_accessor :notification_id
|
|
21
|
+
|
|
22
|
+
attr_accessor :sub_notification_id
|
|
23
|
+
|
|
24
|
+
attr_accessor :seen
|
|
25
|
+
|
|
26
|
+
attr_accessor :title
|
|
27
|
+
|
|
28
|
+
attr_accessor :redirect_url
|
|
29
|
+
|
|
30
|
+
attr_accessor :image_url
|
|
31
|
+
|
|
32
|
+
attr_accessor :delivery_options
|
|
33
|
+
|
|
34
|
+
attr_accessor :template
|
|
35
|
+
|
|
36
|
+
attr_accessor :parameters
|
|
37
|
+
|
|
38
|
+
attr_accessor :date
|
|
39
|
+
|
|
40
|
+
attr_accessor :opened
|
|
41
|
+
|
|
42
|
+
attr_accessor :clicked
|
|
43
|
+
|
|
44
|
+
attr_accessor :archived
|
|
45
|
+
|
|
46
|
+
attr_accessor :actioned1
|
|
47
|
+
|
|
48
|
+
attr_accessor :actioned2
|
|
49
|
+
|
|
50
|
+
attr_accessor :replies
|
|
51
|
+
|
|
52
|
+
attr_accessor :exp_date
|
|
53
|
+
|
|
54
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
55
|
+
def self.attribute_map
|
|
56
|
+
{
|
|
57
|
+
:'id' => :'id',
|
|
58
|
+
:'notification_id' => :'notificationId',
|
|
59
|
+
:'sub_notification_id' => :'subNotificationId',
|
|
60
|
+
:'seen' => :'seen',
|
|
61
|
+
:'title' => :'title',
|
|
62
|
+
:'redirect_url' => :'redirectURL',
|
|
63
|
+
:'image_url' => :'imageURL',
|
|
64
|
+
:'delivery_options' => :'deliveryOptions',
|
|
65
|
+
:'template' => :'template',
|
|
66
|
+
:'parameters' => :'parameters',
|
|
67
|
+
:'date' => :'date',
|
|
68
|
+
:'opened' => :'opened',
|
|
69
|
+
:'clicked' => :'clicked',
|
|
70
|
+
:'archived' => :'archived',
|
|
71
|
+
:'actioned1' => :'actioned1',
|
|
72
|
+
:'actioned2' => :'actioned2',
|
|
73
|
+
:'replies' => :'replies',
|
|
74
|
+
:'exp_date' => :'expDate'
|
|
75
|
+
}
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Returns attribute mapping this model knows about
|
|
79
|
+
def self.acceptable_attribute_map
|
|
80
|
+
attribute_map
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Returns all the JSON keys this model knows about
|
|
84
|
+
def self.acceptable_attributes
|
|
85
|
+
acceptable_attribute_map.values
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Attribute type mapping.
|
|
89
|
+
def self.openapi_types
|
|
90
|
+
{
|
|
91
|
+
:'id' => :'String',
|
|
92
|
+
:'notification_id' => :'String',
|
|
93
|
+
:'sub_notification_id' => :'String',
|
|
94
|
+
:'seen' => :'Boolean',
|
|
95
|
+
:'title' => :'String',
|
|
96
|
+
:'redirect_url' => :'String',
|
|
97
|
+
:'image_url' => :'String',
|
|
98
|
+
:'delivery_options' => :'GetInappNotificationsResponseNotificationsInnerDeliveryOptions',
|
|
99
|
+
:'template' => :'GetInappNotificationsResponseNotificationsInnerTemplate',
|
|
100
|
+
:'parameters' => :'Hash<String, Object>',
|
|
101
|
+
:'date' => :'String',
|
|
102
|
+
:'opened' => :'String',
|
|
103
|
+
:'clicked' => :'String',
|
|
104
|
+
:'archived' => :'String',
|
|
105
|
+
:'actioned1' => :'String',
|
|
106
|
+
:'actioned2' => :'String',
|
|
107
|
+
:'replies' => :'Array<GetInappNotificationsResponseNotificationsInnerRepliesInner>',
|
|
108
|
+
:'exp_date' => :'String'
|
|
109
|
+
}
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# List of attributes with nullable: true
|
|
113
|
+
def self.openapi_nullable
|
|
114
|
+
Set.new([
|
|
115
|
+
])
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Initializes the object
|
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
120
|
+
def initialize(attributes = {})
|
|
121
|
+
if (!attributes.is_a?(Hash))
|
|
122
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::GetInappNotificationsResponseNotificationsInner` initialize method"
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
126
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
127
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
128
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
129
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::GetInappNotificationsResponseNotificationsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
130
|
+
end
|
|
131
|
+
h[k.to_sym] = v
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
if attributes.key?(:'id')
|
|
135
|
+
self.id = attributes[:'id']
|
|
136
|
+
else
|
|
137
|
+
self.id = nil
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if attributes.key?(:'notification_id')
|
|
141
|
+
self.notification_id = attributes[:'notification_id']
|
|
142
|
+
else
|
|
143
|
+
self.notification_id = nil
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
if attributes.key?(:'sub_notification_id')
|
|
147
|
+
self.sub_notification_id = attributes[:'sub_notification_id']
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if attributes.key?(:'seen')
|
|
151
|
+
self.seen = attributes[:'seen']
|
|
152
|
+
else
|
|
153
|
+
self.seen = nil
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if attributes.key?(:'title')
|
|
157
|
+
self.title = attributes[:'title']
|
|
158
|
+
else
|
|
159
|
+
self.title = nil
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if attributes.key?(:'redirect_url')
|
|
163
|
+
self.redirect_url = attributes[:'redirect_url']
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if attributes.key?(:'image_url')
|
|
167
|
+
self.image_url = attributes[:'image_url']
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
if attributes.key?(:'delivery_options')
|
|
171
|
+
self.delivery_options = attributes[:'delivery_options']
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
if attributes.key?(:'template')
|
|
175
|
+
self.template = attributes[:'template']
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if attributes.key?(:'parameters')
|
|
179
|
+
if (value = attributes[:'parameters']).is_a?(Hash)
|
|
180
|
+
self.parameters = value
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
if attributes.key?(:'date')
|
|
185
|
+
self.date = attributes[:'date']
|
|
186
|
+
else
|
|
187
|
+
self.date = nil
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
if attributes.key?(:'opened')
|
|
191
|
+
self.opened = attributes[:'opened']
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
if attributes.key?(:'clicked')
|
|
195
|
+
self.clicked = attributes[:'clicked']
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
if attributes.key?(:'archived')
|
|
199
|
+
self.archived = attributes[:'archived']
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
if attributes.key?(:'actioned1')
|
|
203
|
+
self.actioned1 = attributes[:'actioned1']
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
if attributes.key?(:'actioned2')
|
|
207
|
+
self.actioned2 = attributes[:'actioned2']
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
if attributes.key?(:'replies')
|
|
211
|
+
if (value = attributes[:'replies']).is_a?(Array)
|
|
212
|
+
self.replies = value
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
if attributes.key?(:'exp_date')
|
|
217
|
+
self.exp_date = attributes[:'exp_date']
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
222
|
+
# @return Array for valid properties with the reasons
|
|
223
|
+
def list_invalid_properties
|
|
224
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
225
|
+
invalid_properties = Array.new
|
|
226
|
+
if @id.nil?
|
|
227
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
if @notification_id.nil?
|
|
231
|
+
invalid_properties.push('invalid value for "notification_id", notification_id cannot be nil.')
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
if @seen.nil?
|
|
235
|
+
invalid_properties.push('invalid value for "seen", seen cannot be nil.')
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
if @title.nil?
|
|
239
|
+
invalid_properties.push('invalid value for "title", title cannot be nil.')
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
if @date.nil?
|
|
243
|
+
invalid_properties.push('invalid value for "date", date cannot be nil.')
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
invalid_properties
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# Check to see if the all the properties in the model are valid
|
|
250
|
+
# @return true if the model is valid
|
|
251
|
+
def valid?
|
|
252
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
253
|
+
return false if @id.nil?
|
|
254
|
+
return false if @notification_id.nil?
|
|
255
|
+
return false if @seen.nil?
|
|
256
|
+
return false if @title.nil?
|
|
257
|
+
return false if @date.nil?
|
|
258
|
+
true
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
# Custom attribute writer method with validation
|
|
262
|
+
# @param [Object] id Value to be assigned
|
|
263
|
+
def id=(id)
|
|
264
|
+
if id.nil?
|
|
265
|
+
fail ArgumentError, 'id cannot be nil'
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
@id = id
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# Custom attribute writer method with validation
|
|
272
|
+
# @param [Object] notification_id Value to be assigned
|
|
273
|
+
def notification_id=(notification_id)
|
|
274
|
+
if notification_id.nil?
|
|
275
|
+
fail ArgumentError, 'notification_id cannot be nil'
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
@notification_id = notification_id
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# Custom attribute writer method with validation
|
|
282
|
+
# @param [Object] seen Value to be assigned
|
|
283
|
+
def seen=(seen)
|
|
284
|
+
if seen.nil?
|
|
285
|
+
fail ArgumentError, 'seen cannot be nil'
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
@seen = seen
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
# Custom attribute writer method with validation
|
|
292
|
+
# @param [Object] title Value to be assigned
|
|
293
|
+
def title=(title)
|
|
294
|
+
if title.nil?
|
|
295
|
+
fail ArgumentError, 'title cannot be nil'
|
|
296
|
+
end
|
|
297
|
+
|
|
298
|
+
@title = title
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# Custom attribute writer method with validation
|
|
302
|
+
# @param [Object] date Value to be assigned
|
|
303
|
+
def date=(date)
|
|
304
|
+
if date.nil?
|
|
305
|
+
fail ArgumentError, 'date cannot be nil'
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
@date = date
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
# Checks equality by comparing each attribute.
|
|
312
|
+
# @param [Object] Object to be compared
|
|
313
|
+
def ==(o)
|
|
314
|
+
return true if self.equal?(o)
|
|
315
|
+
self.class == o.class &&
|
|
316
|
+
id == o.id &&
|
|
317
|
+
notification_id == o.notification_id &&
|
|
318
|
+
sub_notification_id == o.sub_notification_id &&
|
|
319
|
+
seen == o.seen &&
|
|
320
|
+
title == o.title &&
|
|
321
|
+
redirect_url == o.redirect_url &&
|
|
322
|
+
image_url == o.image_url &&
|
|
323
|
+
delivery_options == o.delivery_options &&
|
|
324
|
+
template == o.template &&
|
|
325
|
+
parameters == o.parameters &&
|
|
326
|
+
date == o.date &&
|
|
327
|
+
opened == o.opened &&
|
|
328
|
+
clicked == o.clicked &&
|
|
329
|
+
archived == o.archived &&
|
|
330
|
+
actioned1 == o.actioned1 &&
|
|
331
|
+
actioned2 == o.actioned2 &&
|
|
332
|
+
replies == o.replies &&
|
|
333
|
+
exp_date == o.exp_date
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
# @see the `==` method
|
|
337
|
+
# @param [Object] Object to be compared
|
|
338
|
+
def eql?(o)
|
|
339
|
+
self == o
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
# Calculates hash code according to all attributes.
|
|
343
|
+
# @return [Integer] Hash code
|
|
344
|
+
def hash
|
|
345
|
+
[id, notification_id, sub_notification_id, seen, title, redirect_url, image_url, delivery_options, template, parameters, date, opened, clicked, archived, actioned1, actioned2, replies, exp_date].hash
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
# Builds the object from hash
|
|
349
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
350
|
+
# @return [Object] Returns the model itself
|
|
351
|
+
def self.build_from_hash(attributes)
|
|
352
|
+
return nil unless attributes.is_a?(Hash)
|
|
353
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
354
|
+
transformed_hash = {}
|
|
355
|
+
openapi_types.each_pair do |key, type|
|
|
356
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
357
|
+
transformed_hash["#{key}"] = nil
|
|
358
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
359
|
+
# check to ensure the input is an array given that the attribute
|
|
360
|
+
# is documented as an array but the input is not
|
|
361
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
362
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
363
|
+
end
|
|
364
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
365
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
366
|
+
end
|
|
367
|
+
end
|
|
368
|
+
new(transformed_hash)
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
# Returns the object in the form of hash
|
|
372
|
+
# @return [Hash] Returns the object in the form of hash
|
|
373
|
+
def to_hash
|
|
374
|
+
hash = {}
|
|
375
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
376
|
+
value = self.send(attr)
|
|
377
|
+
if value.nil?
|
|
378
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
379
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
hash[param] = _to_hash(value)
|
|
383
|
+
end
|
|
384
|
+
hash
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
end
|
|
388
|
+
|
|
389
|
+
end
|