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,199 @@
|
|
|
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
|
+
# Properties for updating an EMAIL channel template. All fields are optional; only provided fields are updated.
|
|
18
|
+
class TemplatePatchRequestAnyOf < ApiModelBase
|
|
19
|
+
# HTML body of the email.
|
|
20
|
+
attr_accessor :html
|
|
21
|
+
|
|
22
|
+
# Internal editor representation of the email content (e.g. Bee or Redactor JSON). Used for editing and component embedding; the actual email sent to recipients uses the html field.
|
|
23
|
+
attr_accessor :internal
|
|
24
|
+
|
|
25
|
+
# Email subject line.
|
|
26
|
+
attr_accessor :subject
|
|
27
|
+
|
|
28
|
+
# Sender display name.
|
|
29
|
+
attr_accessor :sender_name
|
|
30
|
+
|
|
31
|
+
# Sender email address.
|
|
32
|
+
attr_accessor :sender_email
|
|
33
|
+
|
|
34
|
+
# Migration metadata (e.g. from template migration).
|
|
35
|
+
attr_accessor :migration
|
|
36
|
+
|
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
38
|
+
def self.attribute_map
|
|
39
|
+
{
|
|
40
|
+
:'html' => :'html',
|
|
41
|
+
:'internal' => :'internal',
|
|
42
|
+
:'subject' => :'subject',
|
|
43
|
+
:'sender_name' => :'senderName',
|
|
44
|
+
:'sender_email' => :'senderEmail',
|
|
45
|
+
:'migration' => :'migration'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Returns attribute mapping this model knows about
|
|
50
|
+
def self.acceptable_attribute_map
|
|
51
|
+
attribute_map
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Returns all the JSON keys this model knows about
|
|
55
|
+
def self.acceptable_attributes
|
|
56
|
+
acceptable_attribute_map.values
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Attribute type mapping.
|
|
60
|
+
def self.openapi_types
|
|
61
|
+
{
|
|
62
|
+
:'html' => :'String',
|
|
63
|
+
:'internal' => :'String',
|
|
64
|
+
:'subject' => :'String',
|
|
65
|
+
:'sender_name' => :'String',
|
|
66
|
+
:'sender_email' => :'String',
|
|
67
|
+
:'migration' => :'String'
|
|
68
|
+
}
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# List of attributes with nullable: true
|
|
72
|
+
def self.openapi_nullable
|
|
73
|
+
Set.new([
|
|
74
|
+
])
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Initializes the object
|
|
78
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
79
|
+
def initialize(attributes = {})
|
|
80
|
+
if (!attributes.is_a?(Hash))
|
|
81
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::TemplatePatchRequestAnyOf` initialize method"
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
85
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
86
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
87
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
88
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::TemplatePatchRequestAnyOf`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
89
|
+
end
|
|
90
|
+
h[k.to_sym] = v
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'html')
|
|
94
|
+
self.html = attributes[:'html']
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'internal')
|
|
98
|
+
self.internal = attributes[:'internal']
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if attributes.key?(:'subject')
|
|
102
|
+
self.subject = attributes[:'subject']
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
if attributes.key?(:'sender_name')
|
|
106
|
+
self.sender_name = attributes[:'sender_name']
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'sender_email')
|
|
110
|
+
self.sender_email = attributes[:'sender_email']
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
if attributes.key?(:'migration')
|
|
114
|
+
self.migration = attributes[:'migration']
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
119
|
+
# @return Array for valid properties with the reasons
|
|
120
|
+
def list_invalid_properties
|
|
121
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
122
|
+
invalid_properties = Array.new
|
|
123
|
+
invalid_properties
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Check to see if the all the properties in the model are valid
|
|
127
|
+
# @return true if the model is valid
|
|
128
|
+
def valid?
|
|
129
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
130
|
+
true
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
# Checks equality by comparing each attribute.
|
|
134
|
+
# @param [Object] Object to be compared
|
|
135
|
+
def ==(o)
|
|
136
|
+
return true if self.equal?(o)
|
|
137
|
+
self.class == o.class &&
|
|
138
|
+
html == o.html &&
|
|
139
|
+
internal == o.internal &&
|
|
140
|
+
subject == o.subject &&
|
|
141
|
+
sender_name == o.sender_name &&
|
|
142
|
+
sender_email == o.sender_email &&
|
|
143
|
+
migration == o.migration
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# @see the `==` method
|
|
147
|
+
# @param [Object] Object to be compared
|
|
148
|
+
def eql?(o)
|
|
149
|
+
self == o
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Calculates hash code according to all attributes.
|
|
153
|
+
# @return [Integer] Hash code
|
|
154
|
+
def hash
|
|
155
|
+
[html, internal, subject, sender_name, sender_email, migration].hash
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Builds the object from hash
|
|
159
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
160
|
+
# @return [Object] Returns the model itself
|
|
161
|
+
def self.build_from_hash(attributes)
|
|
162
|
+
return nil unless attributes.is_a?(Hash)
|
|
163
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
164
|
+
transformed_hash = {}
|
|
165
|
+
openapi_types.each_pair do |key, type|
|
|
166
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
167
|
+
transformed_hash["#{key}"] = nil
|
|
168
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
169
|
+
# check to ensure the input is an array given that the attribute
|
|
170
|
+
# is documented as an array but the input is not
|
|
171
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
172
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
173
|
+
end
|
|
174
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
175
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
new(transformed_hash)
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Returns the object in the form of hash
|
|
182
|
+
# @return [Hash] Returns the object in the form of hash
|
|
183
|
+
def to_hash
|
|
184
|
+
hash = {}
|
|
185
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
186
|
+
value = self.send(attr)
|
|
187
|
+
if value.nil?
|
|
188
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
189
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
hash[param] = _to_hash(value)
|
|
193
|
+
end
|
|
194
|
+
hash
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
end
|
|
@@ -0,0 +1,187 @@
|
|
|
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
|
+
# Properties for updating an INAPP_WEB channel template. All fields are optional; only provided fields are updated. instant and batch configure delivery-mode-specific copy (real-time vs batched).
|
|
18
|
+
class TemplatePatchRequestAnyOf1 < ApiModelBase
|
|
19
|
+
# Notification title (in-app).
|
|
20
|
+
attr_accessor :title
|
|
21
|
+
|
|
22
|
+
# URL to open when the user taps the notification.
|
|
23
|
+
attr_accessor :redirect_url
|
|
24
|
+
|
|
25
|
+
# Image URL shown in the in-app notification.
|
|
26
|
+
attr_accessor :image_url
|
|
27
|
+
|
|
28
|
+
attr_accessor :instant
|
|
29
|
+
|
|
30
|
+
attr_accessor :batch
|
|
31
|
+
|
|
32
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
|
+
def self.attribute_map
|
|
34
|
+
{
|
|
35
|
+
:'title' => :'title',
|
|
36
|
+
:'redirect_url' => :'redirectURL',
|
|
37
|
+
:'image_url' => :'imageURL',
|
|
38
|
+
:'instant' => :'instant',
|
|
39
|
+
:'batch' => :'batch'
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Returns attribute mapping this model knows about
|
|
44
|
+
def self.acceptable_attribute_map
|
|
45
|
+
attribute_map
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Returns all the JSON keys this model knows about
|
|
49
|
+
def self.acceptable_attributes
|
|
50
|
+
acceptable_attribute_map.values
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Attribute type mapping.
|
|
54
|
+
def self.openapi_types
|
|
55
|
+
{
|
|
56
|
+
:'title' => :'String',
|
|
57
|
+
:'redirect_url' => :'String',
|
|
58
|
+
:'image_url' => :'String',
|
|
59
|
+
:'instant' => :'TemplatePatchRequestAnyOf1Instant',
|
|
60
|
+
:'batch' => :'TemplatePatchRequestAnyOf1Batch'
|
|
61
|
+
}
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# List of attributes with nullable: true
|
|
65
|
+
def self.openapi_nullable
|
|
66
|
+
Set.new([
|
|
67
|
+
])
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Initializes the object
|
|
71
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
72
|
+
def initialize(attributes = {})
|
|
73
|
+
if (!attributes.is_a?(Hash))
|
|
74
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::TemplatePatchRequestAnyOf1` initialize method"
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
78
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
79
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
80
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::TemplatePatchRequestAnyOf1`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
82
|
+
end
|
|
83
|
+
h[k.to_sym] = v
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'title')
|
|
87
|
+
self.title = attributes[:'title']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'redirect_url')
|
|
91
|
+
self.redirect_url = attributes[:'redirect_url']
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'image_url')
|
|
95
|
+
self.image_url = attributes[:'image_url']
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'instant')
|
|
99
|
+
self.instant = attributes[:'instant']
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'batch')
|
|
103
|
+
self.batch = attributes[:'batch']
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
108
|
+
# @return Array for valid properties with the reasons
|
|
109
|
+
def list_invalid_properties
|
|
110
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
111
|
+
invalid_properties = Array.new
|
|
112
|
+
invalid_properties
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Check to see if the all the properties in the model are valid
|
|
116
|
+
# @return true if the model is valid
|
|
117
|
+
def valid?
|
|
118
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
119
|
+
true
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Checks equality by comparing each attribute.
|
|
123
|
+
# @param [Object] Object to be compared
|
|
124
|
+
def ==(o)
|
|
125
|
+
return true if self.equal?(o)
|
|
126
|
+
self.class == o.class &&
|
|
127
|
+
title == o.title &&
|
|
128
|
+
redirect_url == o.redirect_url &&
|
|
129
|
+
image_url == o.image_url &&
|
|
130
|
+
instant == o.instant &&
|
|
131
|
+
batch == o.batch
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# @see the `==` method
|
|
135
|
+
# @param [Object] Object to be compared
|
|
136
|
+
def eql?(o)
|
|
137
|
+
self == o
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Calculates hash code according to all attributes.
|
|
141
|
+
# @return [Integer] Hash code
|
|
142
|
+
def hash
|
|
143
|
+
[title, redirect_url, image_url, instant, batch].hash
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Builds the object from hash
|
|
147
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
148
|
+
# @return [Object] Returns the model itself
|
|
149
|
+
def self.build_from_hash(attributes)
|
|
150
|
+
return nil unless attributes.is_a?(Hash)
|
|
151
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
152
|
+
transformed_hash = {}
|
|
153
|
+
openapi_types.each_pair do |key, type|
|
|
154
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
155
|
+
transformed_hash["#{key}"] = nil
|
|
156
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
157
|
+
# check to ensure the input is an array given that the attribute
|
|
158
|
+
# is documented as an array but the input is not
|
|
159
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
160
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
161
|
+
end
|
|
162
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
163
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
new(transformed_hash)
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Returns the object in the form of hash
|
|
170
|
+
# @return [Hash] Returns the object in the form of hash
|
|
171
|
+
def to_hash
|
|
172
|
+
hash = {}
|
|
173
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
174
|
+
value = self.send(attr)
|
|
175
|
+
if value.nil?
|
|
176
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
177
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
hash[param] = _to_hash(value)
|
|
181
|
+
end
|
|
182
|
+
hash
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
end
|
|
@@ -0,0 +1,217 @@
|
|
|
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
|
+
# In-app batch delivery: title, redirect URL, and image URL shown when the notification is delivered in batch.
|
|
18
|
+
class TemplatePatchRequestAnyOf1Batch < ApiModelBase
|
|
19
|
+
attr_accessor :title
|
|
20
|
+
|
|
21
|
+
attr_accessor :redirect_url
|
|
22
|
+
|
|
23
|
+
attr_accessor :image_url
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'title' => :'title',
|
|
29
|
+
:'redirect_url' => :'redirectURL',
|
|
30
|
+
:'image_url' => :'imageURL'
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Returns attribute mapping this model knows about
|
|
35
|
+
def self.acceptable_attribute_map
|
|
36
|
+
attribute_map
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns all the JSON keys this model knows about
|
|
40
|
+
def self.acceptable_attributes
|
|
41
|
+
acceptable_attribute_map.values
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Attribute type mapping.
|
|
45
|
+
def self.openapi_types
|
|
46
|
+
{
|
|
47
|
+
:'title' => :'String',
|
|
48
|
+
:'redirect_url' => :'String',
|
|
49
|
+
:'image_url' => :'String'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# List of attributes with nullable: true
|
|
54
|
+
def self.openapi_nullable
|
|
55
|
+
Set.new([
|
|
56
|
+
])
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Initializes the object
|
|
60
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
61
|
+
def initialize(attributes = {})
|
|
62
|
+
if (!attributes.is_a?(Hash))
|
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::TemplatePatchRequestAnyOf1Batch` initialize method"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
67
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
68
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
69
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::TemplatePatchRequestAnyOf1Batch`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
71
|
+
end
|
|
72
|
+
h[k.to_sym] = v
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'title')
|
|
76
|
+
self.title = attributes[:'title']
|
|
77
|
+
else
|
|
78
|
+
self.title = nil
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'redirect_url')
|
|
82
|
+
self.redirect_url = attributes[:'redirect_url']
|
|
83
|
+
else
|
|
84
|
+
self.redirect_url = nil
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'image_url')
|
|
88
|
+
self.image_url = attributes[:'image_url']
|
|
89
|
+
else
|
|
90
|
+
self.image_url = nil
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
95
|
+
# @return Array for valid properties with the reasons
|
|
96
|
+
def list_invalid_properties
|
|
97
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
98
|
+
invalid_properties = Array.new
|
|
99
|
+
if @title.nil?
|
|
100
|
+
invalid_properties.push('invalid value for "title", title cannot be nil.')
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if @redirect_url.nil?
|
|
104
|
+
invalid_properties.push('invalid value for "redirect_url", redirect_url cannot be nil.')
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
if @image_url.nil?
|
|
108
|
+
invalid_properties.push('invalid value for "image_url", image_url cannot be nil.')
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
invalid_properties
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Check to see if the all the properties in the model are valid
|
|
115
|
+
# @return true if the model is valid
|
|
116
|
+
def valid?
|
|
117
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
118
|
+
return false if @title.nil?
|
|
119
|
+
return false if @redirect_url.nil?
|
|
120
|
+
return false if @image_url.nil?
|
|
121
|
+
true
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Custom attribute writer method with validation
|
|
125
|
+
# @param [Object] title Value to be assigned
|
|
126
|
+
def title=(title)
|
|
127
|
+
if title.nil?
|
|
128
|
+
fail ArgumentError, 'title cannot be nil'
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
@title = title
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Custom attribute writer method with validation
|
|
135
|
+
# @param [Object] redirect_url Value to be assigned
|
|
136
|
+
def redirect_url=(redirect_url)
|
|
137
|
+
if redirect_url.nil?
|
|
138
|
+
fail ArgumentError, 'redirect_url cannot be nil'
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
@redirect_url = redirect_url
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Custom attribute writer method with validation
|
|
145
|
+
# @param [Object] image_url Value to be assigned
|
|
146
|
+
def image_url=(image_url)
|
|
147
|
+
if image_url.nil?
|
|
148
|
+
fail ArgumentError, 'image_url cannot be nil'
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
@image_url = image_url
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Checks equality by comparing each attribute.
|
|
155
|
+
# @param [Object] Object to be compared
|
|
156
|
+
def ==(o)
|
|
157
|
+
return true if self.equal?(o)
|
|
158
|
+
self.class == o.class &&
|
|
159
|
+
title == o.title &&
|
|
160
|
+
redirect_url == o.redirect_url &&
|
|
161
|
+
image_url == o.image_url
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# @see the `==` method
|
|
165
|
+
# @param [Object] Object to be compared
|
|
166
|
+
def eql?(o)
|
|
167
|
+
self == o
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Calculates hash code according to all attributes.
|
|
171
|
+
# @return [Integer] Hash code
|
|
172
|
+
def hash
|
|
173
|
+
[title, redirect_url, image_url].hash
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Builds the object from hash
|
|
177
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
178
|
+
# @return [Object] Returns the model itself
|
|
179
|
+
def self.build_from_hash(attributes)
|
|
180
|
+
return nil unless attributes.is_a?(Hash)
|
|
181
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
182
|
+
transformed_hash = {}
|
|
183
|
+
openapi_types.each_pair do |key, type|
|
|
184
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
185
|
+
transformed_hash["#{key}"] = nil
|
|
186
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
187
|
+
# check to ensure the input is an array given that the attribute
|
|
188
|
+
# is documented as an array but the input is not
|
|
189
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
190
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
191
|
+
end
|
|
192
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
193
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
194
|
+
end
|
|
195
|
+
end
|
|
196
|
+
new(transformed_hash)
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Returns the object in the form of hash
|
|
200
|
+
# @return [Hash] Returns the object in the form of hash
|
|
201
|
+
def to_hash
|
|
202
|
+
hash = {}
|
|
203
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
204
|
+
value = self.send(attr)
|
|
205
|
+
if value.nil?
|
|
206
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
207
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
hash[param] = _to_hash(value)
|
|
211
|
+
end
|
|
212
|
+
hash
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
end
|