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,164 @@
|
|
|
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 AddressResponse < ApiModelBase
|
|
18
|
+
attr_accessor :address
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'address' => :'address'
|
|
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
|
+
:'address' => :'AccountAddressesResponseAddressesInner'
|
|
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::AddressResponse` 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::AddressResponse`. 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?(:'address')
|
|
67
|
+
self.address = attributes[:'address']
|
|
68
|
+
else
|
|
69
|
+
self.address = nil
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
74
|
+
# @return Array for valid properties with the reasons
|
|
75
|
+
def list_invalid_properties
|
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
77
|
+
invalid_properties = Array.new
|
|
78
|
+
if @address.nil?
|
|
79
|
+
invalid_properties.push('invalid value for "address", address cannot be nil.')
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
invalid_properties
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Check to see if the all the properties in the model are valid
|
|
86
|
+
# @return true if the model is valid
|
|
87
|
+
def valid?
|
|
88
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
89
|
+
return false if @address.nil?
|
|
90
|
+
true
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Custom attribute writer method with validation
|
|
94
|
+
# @param [Object] address Value to be assigned
|
|
95
|
+
def address=(address)
|
|
96
|
+
if address.nil?
|
|
97
|
+
fail ArgumentError, 'address cannot be nil'
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
@address = address
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Checks equality by comparing each attribute.
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def ==(o)
|
|
106
|
+
return true if self.equal?(o)
|
|
107
|
+
self.class == o.class &&
|
|
108
|
+
address == o.address
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# @see the `==` method
|
|
112
|
+
# @param [Object] Object to be compared
|
|
113
|
+
def eql?(o)
|
|
114
|
+
self == o
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Calculates hash code according to all attributes.
|
|
118
|
+
# @return [Integer] Hash code
|
|
119
|
+
def hash
|
|
120
|
+
[address].hash
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Builds the object from hash
|
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
125
|
+
# @return [Object] Returns the model itself
|
|
126
|
+
def self.build_from_hash(attributes)
|
|
127
|
+
return nil unless attributes.is_a?(Hash)
|
|
128
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
129
|
+
transformed_hash = {}
|
|
130
|
+
openapi_types.each_pair do |key, type|
|
|
131
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
132
|
+
transformed_hash["#{key}"] = nil
|
|
133
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
134
|
+
# check to ensure the input is an array given that the attribute
|
|
135
|
+
# is documented as an array but the input is not
|
|
136
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
137
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
138
|
+
end
|
|
139
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
140
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
141
|
+
end
|
|
142
|
+
end
|
|
143
|
+
new(transformed_hash)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Returns the object in the form of hash
|
|
147
|
+
# @return [Hash] Returns the object in the form of hash
|
|
148
|
+
def to_hash
|
|
149
|
+
hash = {}
|
|
150
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
151
|
+
value = self.send(attr)
|
|
152
|
+
if value.nil?
|
|
153
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
154
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
hash[param] = _to_hash(value)
|
|
158
|
+
end
|
|
159
|
+
hash
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
end
|
|
@@ -0,0 +1,192 @@
|
|
|
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 AutoJoinGetResponse < ApiModelBase
|
|
18
|
+
attr_accessor :account_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :domains
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'account_id' => :'accountId',
|
|
26
|
+
:'domains' => :'domains'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'account_id' => :'String',
|
|
44
|
+
:'domains' => :'Array<String>'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::AutoJoinGetResponse` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::AutoJoinGetResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'account_id')
|
|
71
|
+
self.account_id = attributes[:'account_id']
|
|
72
|
+
else
|
|
73
|
+
self.account_id = nil
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'domains')
|
|
77
|
+
if (value = attributes[:'domains']).is_a?(Array)
|
|
78
|
+
self.domains = value
|
|
79
|
+
end
|
|
80
|
+
else
|
|
81
|
+
self.domains = nil
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
+
# @return Array for valid properties with the reasons
|
|
87
|
+
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
if @account_id.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if @domains.nil?
|
|
95
|
+
invalid_properties.push('invalid value for "domains", domains cannot be nil.')
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
invalid_properties
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Check to see if the all the properties in the model are valid
|
|
102
|
+
# @return true if the model is valid
|
|
103
|
+
def valid?
|
|
104
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
105
|
+
return false if @account_id.nil?
|
|
106
|
+
return false if @domains.nil?
|
|
107
|
+
true
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Custom attribute writer method with validation
|
|
111
|
+
# @param [Object] account_id Value to be assigned
|
|
112
|
+
def account_id=(account_id)
|
|
113
|
+
if account_id.nil?
|
|
114
|
+
fail ArgumentError, 'account_id cannot be nil'
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
@account_id = account_id
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Custom attribute writer method with validation
|
|
121
|
+
# @param [Object] domains Value to be assigned
|
|
122
|
+
def domains=(domains)
|
|
123
|
+
if domains.nil?
|
|
124
|
+
fail ArgumentError, 'domains cannot be nil'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
@domains = domains
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Checks equality by comparing each attribute.
|
|
131
|
+
# @param [Object] Object to be compared
|
|
132
|
+
def ==(o)
|
|
133
|
+
return true if self.equal?(o)
|
|
134
|
+
self.class == o.class &&
|
|
135
|
+
account_id == o.account_id &&
|
|
136
|
+
domains == o.domains
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# @see the `==` method
|
|
140
|
+
# @param [Object] Object to be compared
|
|
141
|
+
def eql?(o)
|
|
142
|
+
self == o
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Calculates hash code according to all attributes.
|
|
146
|
+
# @return [Integer] Hash code
|
|
147
|
+
def hash
|
|
148
|
+
[account_id, domains].hash
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Builds the object from hash
|
|
152
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
153
|
+
# @return [Object] Returns the model itself
|
|
154
|
+
def self.build_from_hash(attributes)
|
|
155
|
+
return nil unless attributes.is_a?(Hash)
|
|
156
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
157
|
+
transformed_hash = {}
|
|
158
|
+
openapi_types.each_pair do |key, type|
|
|
159
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
160
|
+
transformed_hash["#{key}"] = nil
|
|
161
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
162
|
+
# check to ensure the input is an array given that the attribute
|
|
163
|
+
# is documented as an array but the input is not
|
|
164
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
165
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
166
|
+
end
|
|
167
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
168
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
new(transformed_hash)
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Returns the object in the form of hash
|
|
175
|
+
# @return [Hash] Returns the object in the form of hash
|
|
176
|
+
def to_hash
|
|
177
|
+
hash = {}
|
|
178
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
179
|
+
value = self.send(attr)
|
|
180
|
+
if value.nil?
|
|
181
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
182
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
hash[param] = _to_hash(value)
|
|
186
|
+
end
|
|
187
|
+
hash
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
end
|
|
@@ -0,0 +1,192 @@
|
|
|
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 AutoJoinPostResponse < ApiModelBase
|
|
18
|
+
attr_accessor :account_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :domains
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'account_id' => :'accountId',
|
|
26
|
+
:'domains' => :'domains'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'account_id' => :'String',
|
|
44
|
+
:'domains' => :'Array<String>'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::AutoJoinPostResponse` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::AutoJoinPostResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'account_id')
|
|
71
|
+
self.account_id = attributes[:'account_id']
|
|
72
|
+
else
|
|
73
|
+
self.account_id = nil
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'domains')
|
|
77
|
+
if (value = attributes[:'domains']).is_a?(Array)
|
|
78
|
+
self.domains = value
|
|
79
|
+
end
|
|
80
|
+
else
|
|
81
|
+
self.domains = nil
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
+
# @return Array for valid properties with the reasons
|
|
87
|
+
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
if @account_id.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if @domains.nil?
|
|
95
|
+
invalid_properties.push('invalid value for "domains", domains cannot be nil.')
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
invalid_properties
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Check to see if the all the properties in the model are valid
|
|
102
|
+
# @return true if the model is valid
|
|
103
|
+
def valid?
|
|
104
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
105
|
+
return false if @account_id.nil?
|
|
106
|
+
return false if @domains.nil?
|
|
107
|
+
true
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Custom attribute writer method with validation
|
|
111
|
+
# @param [Object] account_id Value to be assigned
|
|
112
|
+
def account_id=(account_id)
|
|
113
|
+
if account_id.nil?
|
|
114
|
+
fail ArgumentError, 'account_id cannot be nil'
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
@account_id = account_id
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Custom attribute writer method with validation
|
|
121
|
+
# @param [Object] domains Value to be assigned
|
|
122
|
+
def domains=(domains)
|
|
123
|
+
if domains.nil?
|
|
124
|
+
fail ArgumentError, 'domains cannot be nil'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
@domains = domains
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Checks equality by comparing each attribute.
|
|
131
|
+
# @param [Object] Object to be compared
|
|
132
|
+
def ==(o)
|
|
133
|
+
return true if self.equal?(o)
|
|
134
|
+
self.class == o.class &&
|
|
135
|
+
account_id == o.account_id &&
|
|
136
|
+
domains == o.domains
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# @see the `==` method
|
|
140
|
+
# @param [Object] Object to be compared
|
|
141
|
+
def eql?(o)
|
|
142
|
+
self == o
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Calculates hash code according to all attributes.
|
|
146
|
+
# @return [Integer] Hash code
|
|
147
|
+
def hash
|
|
148
|
+
[account_id, domains].hash
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Builds the object from hash
|
|
152
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
153
|
+
# @return [Object] Returns the model itself
|
|
154
|
+
def self.build_from_hash(attributes)
|
|
155
|
+
return nil unless attributes.is_a?(Hash)
|
|
156
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
157
|
+
transformed_hash = {}
|
|
158
|
+
openapi_types.each_pair do |key, type|
|
|
159
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
160
|
+
transformed_hash["#{key}"] = nil
|
|
161
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
162
|
+
# check to ensure the input is an array given that the attribute
|
|
163
|
+
# is documented as an array but the input is not
|
|
164
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
165
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
166
|
+
end
|
|
167
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
168
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
new(transformed_hash)
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Returns the object in the form of hash
|
|
175
|
+
# @return [Hash] Returns the object in the form of hash
|
|
176
|
+
def to_hash
|
|
177
|
+
hash = {}
|
|
178
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
179
|
+
value = self.send(attr)
|
|
180
|
+
if value.nil?
|
|
181
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
182
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
hash[param] = _to_hash(value)
|
|
186
|
+
end
|
|
187
|
+
hash
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
end
|
|
@@ -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 AutoJoinRequestBody < ApiModelBase
|
|
18
|
+
attr_accessor :domains
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'domains' => :'domains'
|
|
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
|
+
:'domains' => :'Array<String>'
|
|
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::AutoJoinRequestBody` 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::AutoJoinRequestBody`. 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?(:'domains')
|
|
67
|
+
if (value = attributes[:'domains']).is_a?(Array)
|
|
68
|
+
self.domains = value
|
|
69
|
+
end
|
|
70
|
+
else
|
|
71
|
+
self.domains = 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 @domains.nil?
|
|
81
|
+
invalid_properties.push('invalid value for "domains", domains 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 @domains.nil?
|
|
92
|
+
true
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Custom attribute writer method with validation
|
|
96
|
+
# @param [Object] domains Value to be assigned
|
|
97
|
+
def domains=(domains)
|
|
98
|
+
if domains.nil?
|
|
99
|
+
fail ArgumentError, 'domains cannot be nil'
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
@domains = domains
|
|
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
|
+
domains == o.domains
|
|
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
|
+
[domains].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
|