pingram 1.0.33 → 1.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/pingram/api/account_api.rb +5 -2
- data/lib/pingram/api/user_api.rb +0 -248
- data/lib/pingram/api/webhooks_api.rb +12 -12
- data/lib/pingram/api_client.rb +1 -1
- data/lib/pingram/models/create_account_request_plan.rb +2 -2
- data/lib/pingram/models/get_usage_history_query.rb +14 -4
- data/lib/pingram/models/get_usage_history_response.rb +1 -1
- data/lib/pingram/models/get_usage_history_response_items_inner.rb +1 -1
- data/lib/pingram/models/user_preferences_get_response.rb +222 -0
- data/lib/pingram/models/user_preferences_get_response_notifications_inner.rb +227 -0
- data/lib/pingram/models/user_preferences_get_response_preferences_inner.rb +249 -0
- data/lib/pingram/models/user_preferences_get_response_sub_notifications_inner.rb +216 -0
- data/lib/pingram/models/user_preferences_post_request_inner.rb +268 -0
- data/lib/pingram/models/user_preferences_post_response_inner.rb +253 -0
- data/lib/pingram/models/user_preferences_post_response_inner_channels_states_inner.rb +240 -0
- data/lib/pingram/models/webhook_endpoint.rb +3 -3
- data/lib/pingram/models/webhook_endpoint_upsert_request.rb +2 -2
- data/lib/pingram/models/webhook_endpoints_response_endpoints_inner.rb +3 -3
- data/lib/pingram/version.rb +1 -1
- data/lib/pingram.rb +7 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.4/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.9.4/mkmf.log +3 -3
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.5.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
- metadata +9 -2
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pingram
|
|
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 UserPreferencesPOSTResponseInner < ApiModelBase
|
|
18
|
+
attr_accessor :env_id
|
|
19
|
+
|
|
20
|
+
attr_accessor :user_id
|
|
21
|
+
|
|
22
|
+
attr_accessor :notification_id
|
|
23
|
+
|
|
24
|
+
attr_accessor :sub_notification_id
|
|
25
|
+
|
|
26
|
+
attr_accessor :channels_states
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'env_id' => :'envId',
|
|
32
|
+
:'user_id' => :'userId',
|
|
33
|
+
:'notification_id' => :'notificationId',
|
|
34
|
+
:'sub_notification_id' => :'subNotificationId',
|
|
35
|
+
:'channels_states' => :'channelsStates'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns attribute mapping this model knows about
|
|
40
|
+
def self.acceptable_attribute_map
|
|
41
|
+
attribute_map
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns all the JSON keys this model knows about
|
|
45
|
+
def self.acceptable_attributes
|
|
46
|
+
acceptable_attribute_map.values
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute type mapping.
|
|
50
|
+
def self.openapi_types
|
|
51
|
+
{
|
|
52
|
+
:'env_id' => :'String',
|
|
53
|
+
:'user_id' => :'String',
|
|
54
|
+
:'notification_id' => :'String',
|
|
55
|
+
:'sub_notification_id' => :'String',
|
|
56
|
+
:'channels_states' => :'Array<UserPreferencesPOSTResponseInnerChannelsStatesInner>'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
])
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::UserPreferencesPOSTResponseInner` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::UserPreferencesPOSTResponseInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
78
|
+
end
|
|
79
|
+
h[k.to_sym] = v
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'env_id')
|
|
83
|
+
self.env_id = attributes[:'env_id']
|
|
84
|
+
else
|
|
85
|
+
self.env_id = nil
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'user_id')
|
|
89
|
+
self.user_id = attributes[:'user_id']
|
|
90
|
+
else
|
|
91
|
+
self.user_id = nil
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'notification_id')
|
|
95
|
+
self.notification_id = attributes[:'notification_id']
|
|
96
|
+
else
|
|
97
|
+
self.notification_id = nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'sub_notification_id')
|
|
101
|
+
self.sub_notification_id = attributes[:'sub_notification_id']
|
|
102
|
+
else
|
|
103
|
+
self.sub_notification_id = nil
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'channels_states')
|
|
107
|
+
if (value = attributes[:'channels_states']).is_a?(Array)
|
|
108
|
+
self.channels_states = value
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
114
|
+
# @return Array for valid properties with the reasons
|
|
115
|
+
def list_invalid_properties
|
|
116
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
117
|
+
invalid_properties = Array.new
|
|
118
|
+
if @env_id.nil?
|
|
119
|
+
invalid_properties.push('invalid value for "env_id", env_id cannot be nil.')
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if @user_id.nil?
|
|
123
|
+
invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if @notification_id.nil?
|
|
127
|
+
invalid_properties.push('invalid value for "notification_id", notification_id cannot be nil.')
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if @sub_notification_id.nil?
|
|
131
|
+
invalid_properties.push('invalid value for "sub_notification_id", sub_notification_id cannot be nil.')
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
invalid_properties
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Check to see if the all the properties in the model are valid
|
|
138
|
+
# @return true if the model is valid
|
|
139
|
+
def valid?
|
|
140
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
141
|
+
return false if @env_id.nil?
|
|
142
|
+
return false if @user_id.nil?
|
|
143
|
+
return false if @notification_id.nil?
|
|
144
|
+
return false if @sub_notification_id.nil?
|
|
145
|
+
true
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Custom attribute writer method with validation
|
|
149
|
+
# @param [Object] env_id Value to be assigned
|
|
150
|
+
def env_id=(env_id)
|
|
151
|
+
if env_id.nil?
|
|
152
|
+
fail ArgumentError, 'env_id cannot be nil'
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
@env_id = env_id
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Custom attribute writer method with validation
|
|
159
|
+
# @param [Object] user_id Value to be assigned
|
|
160
|
+
def user_id=(user_id)
|
|
161
|
+
if user_id.nil?
|
|
162
|
+
fail ArgumentError, 'user_id cannot be nil'
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
@user_id = user_id
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# Custom attribute writer method with validation
|
|
169
|
+
# @param [Object] notification_id Value to be assigned
|
|
170
|
+
def notification_id=(notification_id)
|
|
171
|
+
if notification_id.nil?
|
|
172
|
+
fail ArgumentError, 'notification_id cannot be nil'
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
@notification_id = notification_id
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Custom attribute writer method with validation
|
|
179
|
+
# @param [Object] sub_notification_id Value to be assigned
|
|
180
|
+
def sub_notification_id=(sub_notification_id)
|
|
181
|
+
if sub_notification_id.nil?
|
|
182
|
+
fail ArgumentError, 'sub_notification_id cannot be nil'
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
@sub_notification_id = sub_notification_id
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Checks equality by comparing each attribute.
|
|
189
|
+
# @param [Object] Object to be compared
|
|
190
|
+
def ==(o)
|
|
191
|
+
return true if self.equal?(o)
|
|
192
|
+
self.class == o.class &&
|
|
193
|
+
env_id == o.env_id &&
|
|
194
|
+
user_id == o.user_id &&
|
|
195
|
+
notification_id == o.notification_id &&
|
|
196
|
+
sub_notification_id == o.sub_notification_id &&
|
|
197
|
+
channels_states == o.channels_states
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# @see the `==` method
|
|
201
|
+
# @param [Object] Object to be compared
|
|
202
|
+
def eql?(o)
|
|
203
|
+
self == o
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Calculates hash code according to all attributes.
|
|
207
|
+
# @return [Integer] Hash code
|
|
208
|
+
def hash
|
|
209
|
+
[env_id, user_id, notification_id, sub_notification_id, channels_states].hash
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Builds the object from hash
|
|
213
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
214
|
+
# @return [Object] Returns the model itself
|
|
215
|
+
def self.build_from_hash(attributes)
|
|
216
|
+
return nil unless attributes.is_a?(Hash)
|
|
217
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
218
|
+
transformed_hash = {}
|
|
219
|
+
openapi_types.each_pair do |key, type|
|
|
220
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
221
|
+
transformed_hash["#{key}"] = nil
|
|
222
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
223
|
+
# check to ensure the input is an array given that the attribute
|
|
224
|
+
# is documented as an array but the input is not
|
|
225
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
226
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
227
|
+
end
|
|
228
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
229
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
new(transformed_hash)
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Returns the object in the form of hash
|
|
236
|
+
# @return [Hash] Returns the object in the form of hash
|
|
237
|
+
def to_hash
|
|
238
|
+
hash = {}
|
|
239
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
240
|
+
value = self.send(attr)
|
|
241
|
+
if value.nil?
|
|
242
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
243
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
hash[param] = _to_hash(value)
|
|
247
|
+
end
|
|
248
|
+
hash
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
end
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Pingram
|
|
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 UserPreferencesPOSTResponseInnerChannelsStatesInner < ApiModelBase
|
|
18
|
+
attr_accessor :channel
|
|
19
|
+
|
|
20
|
+
attr_accessor :state
|
|
21
|
+
|
|
22
|
+
attr_accessor :delivery
|
|
23
|
+
|
|
24
|
+
class EnumAttributeValidator
|
|
25
|
+
attr_reader :datatype
|
|
26
|
+
attr_reader :allowable_values
|
|
27
|
+
|
|
28
|
+
def initialize(datatype, allowable_values)
|
|
29
|
+
@allowable_values = allowable_values.map do |value|
|
|
30
|
+
case datatype.to_s
|
|
31
|
+
when /Integer/i
|
|
32
|
+
value.to_i
|
|
33
|
+
when /Float/i
|
|
34
|
+
value.to_f
|
|
35
|
+
else
|
|
36
|
+
value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def valid?(value)
|
|
42
|
+
!value || allowable_values.include?(value)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
47
|
+
def self.attribute_map
|
|
48
|
+
{
|
|
49
|
+
:'channel' => :'channel',
|
|
50
|
+
:'state' => :'state',
|
|
51
|
+
:'delivery' => :'delivery'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Returns attribute mapping this model knows about
|
|
56
|
+
def self.acceptable_attribute_map
|
|
57
|
+
attribute_map
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Returns all the JSON keys this model knows about
|
|
61
|
+
def self.acceptable_attributes
|
|
62
|
+
acceptable_attribute_map.values
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Attribute type mapping.
|
|
66
|
+
def self.openapi_types
|
|
67
|
+
{
|
|
68
|
+
:'channel' => :'ChannelsEnum',
|
|
69
|
+
:'state' => :'Boolean',
|
|
70
|
+
:'delivery' => :'String'
|
|
71
|
+
}
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# List of attributes with nullable: true
|
|
75
|
+
def self.openapi_nullable
|
|
76
|
+
Set.new([
|
|
77
|
+
])
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Initializes the object
|
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
82
|
+
def initialize(attributes = {})
|
|
83
|
+
if (!attributes.is_a?(Hash))
|
|
84
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::UserPreferencesPOSTResponseInnerChannelsStatesInner` initialize method"
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
88
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
89
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
90
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
91
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::UserPreferencesPOSTResponseInnerChannelsStatesInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
92
|
+
end
|
|
93
|
+
h[k.to_sym] = v
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'channel')
|
|
97
|
+
self.channel = attributes[:'channel']
|
|
98
|
+
else
|
|
99
|
+
self.channel = nil
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'state')
|
|
103
|
+
self.state = attributes[:'state']
|
|
104
|
+
else
|
|
105
|
+
self.state = nil
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'delivery')
|
|
109
|
+
self.delivery = attributes[:'delivery']
|
|
110
|
+
else
|
|
111
|
+
self.delivery = nil
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
116
|
+
# @return Array for valid properties with the reasons
|
|
117
|
+
def list_invalid_properties
|
|
118
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
119
|
+
invalid_properties = Array.new
|
|
120
|
+
if @channel.nil?
|
|
121
|
+
invalid_properties.push('invalid value for "channel", channel cannot be nil.')
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if @state.nil?
|
|
125
|
+
invalid_properties.push('invalid value for "state", state cannot be nil.')
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if @delivery.nil?
|
|
129
|
+
invalid_properties.push('invalid value for "delivery", delivery cannot be nil.')
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
invalid_properties
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Check to see if the all the properties in the model are valid
|
|
136
|
+
# @return true if the model is valid
|
|
137
|
+
def valid?
|
|
138
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
139
|
+
return false if @channel.nil?
|
|
140
|
+
return false if @state.nil?
|
|
141
|
+
return false if @delivery.nil?
|
|
142
|
+
delivery_validator = EnumAttributeValidator.new('String', ["off", "instant", "hourly", "daily", "weekly", "monthly"])
|
|
143
|
+
return false unless delivery_validator.valid?(@delivery)
|
|
144
|
+
true
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Custom attribute writer method with validation
|
|
148
|
+
# @param [Object] channel Value to be assigned
|
|
149
|
+
def channel=(channel)
|
|
150
|
+
if channel.nil?
|
|
151
|
+
fail ArgumentError, 'channel cannot be nil'
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
@channel = channel
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Custom attribute writer method with validation
|
|
158
|
+
# @param [Object] state Value to be assigned
|
|
159
|
+
def state=(state)
|
|
160
|
+
if state.nil?
|
|
161
|
+
fail ArgumentError, 'state cannot be nil'
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
@state = state
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
168
|
+
# @param [Object] delivery Object to be assigned
|
|
169
|
+
def delivery=(delivery)
|
|
170
|
+
validator = EnumAttributeValidator.new('String', ["off", "instant", "hourly", "daily", "weekly", "monthly"])
|
|
171
|
+
unless validator.valid?(delivery)
|
|
172
|
+
fail ArgumentError, "invalid value for \"delivery\", must be one of #{validator.allowable_values}."
|
|
173
|
+
end
|
|
174
|
+
@delivery = delivery
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Checks equality by comparing each attribute.
|
|
178
|
+
# @param [Object] Object to be compared
|
|
179
|
+
def ==(o)
|
|
180
|
+
return true if self.equal?(o)
|
|
181
|
+
self.class == o.class &&
|
|
182
|
+
channel == o.channel &&
|
|
183
|
+
state == o.state &&
|
|
184
|
+
delivery == o.delivery
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# @see the `==` method
|
|
188
|
+
# @param [Object] Object to be compared
|
|
189
|
+
def eql?(o)
|
|
190
|
+
self == o
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Calculates hash code according to all attributes.
|
|
194
|
+
# @return [Integer] Hash code
|
|
195
|
+
def hash
|
|
196
|
+
[channel, state, delivery].hash
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Builds the object from hash
|
|
200
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
201
|
+
# @return [Object] Returns the model itself
|
|
202
|
+
def self.build_from_hash(attributes)
|
|
203
|
+
return nil unless attributes.is_a?(Hash)
|
|
204
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
205
|
+
transformed_hash = {}
|
|
206
|
+
openapi_types.each_pair do |key, type|
|
|
207
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
208
|
+
transformed_hash["#{key}"] = nil
|
|
209
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
210
|
+
# check to ensure the input is an array given that the attribute
|
|
211
|
+
# is documented as an array but the input is not
|
|
212
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
213
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
214
|
+
end
|
|
215
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
216
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
new(transformed_hash)
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Returns the object in the form of hash
|
|
223
|
+
# @return [Hash] Returns the object in the form of hash
|
|
224
|
+
def to_hash
|
|
225
|
+
hash = {}
|
|
226
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
227
|
+
value = self.send(attr)
|
|
228
|
+
if value.nil?
|
|
229
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
230
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
hash[param] = _to_hash(value)
|
|
234
|
+
end
|
|
235
|
+
hash
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
end
|
|
@@ -19,13 +19,13 @@ module Pingram
|
|
|
19
19
|
# Unique identifier for this endpoint within the account.
|
|
20
20
|
attr_accessor :id
|
|
21
21
|
|
|
22
|
-
# Destination URL that receives
|
|
22
|
+
# Destination URL that receives signed JSON event payloads.
|
|
23
23
|
attr_accessor :webhook
|
|
24
24
|
|
|
25
|
-
#
|
|
25
|
+
# Subscribed event types for this endpoint.
|
|
26
26
|
attr_accessor :events
|
|
27
27
|
|
|
28
|
-
# HMAC secret for verifying
|
|
28
|
+
# HMAC secret for verifying X-Pingram-Signature. Returned on create and list; updates keep the same secret. Format: pingram_whsecret_...
|
|
29
29
|
attr_accessor :secret
|
|
30
30
|
|
|
31
31
|
class EnumAttributeValidator
|
|
@@ -16,10 +16,10 @@ require 'time'
|
|
|
16
16
|
module Pingram
|
|
17
17
|
# Request body for creating or updating an events webhook endpoint.
|
|
18
18
|
class WebhookEndpointUpsertRequest < ApiModelBase
|
|
19
|
-
#
|
|
19
|
+
# Public http or https URL that accepts POST with a JSON event body. Return 2xx to acknowledge. Requests include X-Pingram-Id, X-Pingram-Signature (v1 HMAC-SHA256), and X-Pingram-Timestamp.
|
|
20
20
|
attr_accessor :webhook
|
|
21
21
|
|
|
22
|
-
#
|
|
22
|
+
# Full set of event types to deliver to this URL. Omitting an event on update unsubscribes it. Inbound SMS to the free shared number only works when that person has already received a text from this number. Inbound SMS to a dedicated number works normally.
|
|
23
23
|
attr_accessor :events
|
|
24
24
|
|
|
25
25
|
class EnumAttributeValidator
|
|
@@ -19,13 +19,13 @@ module Pingram
|
|
|
19
19
|
# Unique identifier for this endpoint within the account.
|
|
20
20
|
attr_accessor :id
|
|
21
21
|
|
|
22
|
-
# Destination URL that receives
|
|
22
|
+
# Destination URL that receives signed JSON event payloads.
|
|
23
23
|
attr_accessor :webhook
|
|
24
24
|
|
|
25
|
-
#
|
|
25
|
+
# Subscribed event types for this endpoint.
|
|
26
26
|
attr_accessor :events
|
|
27
27
|
|
|
28
|
-
# HMAC secret for verifying
|
|
28
|
+
# HMAC secret for verifying X-Pingram-Signature. Returned on create and list; updates keep the same secret. Format: pingram_whsecret_...
|
|
29
29
|
attr_accessor :secret
|
|
30
30
|
|
|
31
31
|
class EnumAttributeValidator
|
data/lib/pingram/version.rb
CHANGED
data/lib/pingram.rb
CHANGED
|
@@ -300,6 +300,13 @@ require 'pingram/models/update_broadcast_request'
|
|
|
300
300
|
require 'pingram/models/update_voice_agent_request'
|
|
301
301
|
require 'pingram/models/update_voice_agent_response'
|
|
302
302
|
require 'pingram/models/user'
|
|
303
|
+
require 'pingram/models/user_preferences_get_response'
|
|
304
|
+
require 'pingram/models/user_preferences_get_response_notifications_inner'
|
|
305
|
+
require 'pingram/models/user_preferences_get_response_preferences_inner'
|
|
306
|
+
require 'pingram/models/user_preferences_get_response_sub_notifications_inner'
|
|
307
|
+
require 'pingram/models/user_preferences_post_request_inner'
|
|
308
|
+
require 'pingram/models/user_preferences_post_response_inner'
|
|
309
|
+
require 'pingram/models/user_preferences_post_response_inner_channels_states_inner'
|
|
303
310
|
require 'pingram/models/user_suppression_delete_response'
|
|
304
311
|
require 'pingram/models/voice_browser_call_request'
|
|
305
312
|
require 'pingram/models/voice_browser_call_response'
|
|
@@ -3,10 +3,10 @@ current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/v
|
|
|
3
3
|
creating Makefile
|
|
4
4
|
|
|
5
5
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/byebug-13.0.0/ext/byebug
|
|
6
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
6
|
+
make DESTDIR\= sitearchdir\=./.gem.20260928-2480-t7sopq sitelibdir\=./.gem.20260928-2480-t7sopq clean
|
|
7
7
|
|
|
8
8
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/byebug-13.0.0/ext/byebug
|
|
9
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
9
|
+
make DESTDIR\= sitearchdir\=./.gem.20260928-2480-t7sopq sitelibdir\=./.gem.20260928-2480-t7sopq
|
|
10
10
|
compiling breakpoint.c
|
|
11
11
|
compiling byebug.c
|
|
12
12
|
byebug.c: In function ‘check_started’:
|
|
@@ -35,8 +35,8 @@ compiling threads.c
|
|
|
35
35
|
linking shared-object byebug/byebug.so
|
|
36
36
|
|
|
37
37
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/byebug-13.0.0/ext/byebug
|
|
38
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
39
|
-
/usr/bin/install -c -m 0755 byebug.so ./.gem.
|
|
38
|
+
make DESTDIR\= sitearchdir\=./.gem.20260928-2480-t7sopq sitelibdir\=./.gem.20260928-2480-t7sopq install
|
|
39
|
+
/usr/bin/install -c -m 0755 byebug.so ./.gem.20260928-2480-t7sopq/byebug
|
|
40
40
|
|
|
41
41
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/byebug-13.0.0/ext/byebug
|
|
42
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
42
|
+
make DESTDIR\= sitearchdir\=./.gem.20260928-2480-t7sopq sitelibdir\=./.gem.20260928-2480-t7sopq clean
|
|
@@ -6,10 +6,10 @@ checking for altzone in time.h with -Werror... no
|
|
|
6
6
|
creating Makefile
|
|
7
7
|
|
|
8
8
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/date-3.5.1/ext/date
|
|
9
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
9
|
+
make DESTDIR\= sitearchdir\=./.gem.20260928-2480-hay811 sitelibdir\=./.gem.20260928-2480-hay811 clean
|
|
10
10
|
|
|
11
11
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/date-3.5.1/ext/date
|
|
12
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
12
|
+
make DESTDIR\= sitearchdir\=./.gem.20260928-2480-hay811 sitelibdir\=./.gem.20260928-2480-hay811
|
|
13
13
|
compiling date_core.c
|
|
14
14
|
compiling date_parse.c
|
|
15
15
|
compiling date_strftime.c
|
|
@@ -17,8 +17,8 @@ compiling date_strptime.c
|
|
|
17
17
|
linking shared-object date_core.so
|
|
18
18
|
|
|
19
19
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/date-3.5.1/ext/date
|
|
20
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
21
|
-
/usr/bin/install -c -m 0755 date_core.so ./.gem.
|
|
20
|
+
make DESTDIR\= sitearchdir\=./.gem.20260928-2480-hay811 sitelibdir\=./.gem.20260928-2480-hay811 install
|
|
21
|
+
/usr/bin/install -c -m 0755 date_core.so ./.gem.20260928-2480-hay811
|
|
22
22
|
|
|
23
23
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/date-3.5.1/ext/date
|
|
24
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
24
|
+
make DESTDIR\= sitearchdir\=./.gem.20260928-2480-hay811 sitelibdir\=./.gem.20260928-2480-hay811 clean
|
|
@@ -19,16 +19,16 @@ checking for gperf... no
|
|
|
19
19
|
creating Makefile
|
|
20
20
|
|
|
21
21
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.4/ext/io/console
|
|
22
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
22
|
+
make DESTDIR\= sitearchdir\=./.gem.20260928-2480-f84q96 sitelibdir\=./.gem.20260928-2480-f84q96 clean
|
|
23
23
|
|
|
24
24
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.4/ext/io/console
|
|
25
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
25
|
+
make DESTDIR\= sitearchdir\=./.gem.20260928-2480-f84q96 sitelibdir\=./.gem.20260928-2480-f84q96
|
|
26
26
|
compiling console.c
|
|
27
27
|
linking shared-object io/console.so
|
|
28
28
|
|
|
29
29
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.4/ext/io/console
|
|
30
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
31
|
-
/usr/bin/install -c -m 0755 console.so ./.gem.
|
|
30
|
+
make DESTDIR\= sitearchdir\=./.gem.20260928-2480-f84q96 sitelibdir\=./.gem.20260928-2480-f84q96 install
|
|
31
|
+
/usr/bin/install -c -m 0755 console.so ./.gem.20260928-2480-f84q96/io
|
|
32
32
|
|
|
33
33
|
current directory: /home/runner/work/serverless/serverless/sdks/ruby/generated/vendor/bundle/ruby/3.2.0/gems/io-console-0.9.4/ext/io/console
|
|
34
|
-
make DESTDIR\= sitearchdir\=./.gem.
|
|
34
|
+
make DESTDIR\= sitearchdir\=./.gem.20260928-2480-f84q96 sitelibdir\=./.gem.20260928-2480-f84q96 clean
|