pingram 1.0.36 → 1.0.37
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 +244 -2
- data/lib/pingram/api_client.rb +1 -1
- data/lib/pingram/models/account_get_response.rb +13 -4
- data/lib/pingram/models/account_get_response_billing_alerts.rb +224 -0
- data/lib/pingram/models/account_patch_request.rb +13 -4
- data/lib/pingram/models/billing_email.rb +177 -0
- data/lib/pingram/models/billing_post_response_body.rb +10 -1
- data/lib/pingram/models/cancel_subscription_request.rb +168 -0
- data/lib/pingram/models/phone_verify_start_response.rb +14 -4
- data/lib/pingram/models/sender_post_body_sms.rb +1 -1
- data/lib/pingram/models/sender_post_body_sms_auto_reply.rb +2 -1
- data/lib/pingram/models/slack_connect_invite_response.rb +190 -0
- data/lib/pingram/models/update_billing_email_request.rb +184 -0
- data/lib/pingram/models/webhook_event.rb +88 -6
- data/lib/pingram/models/webhook_event_usage_value.rb +193 -0
- data/lib/pingram/version.rb +1 -1
- data/lib/pingram.rb +6 -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 +8 -2
|
@@ -0,0 +1,184 @@
|
|
|
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
|
+
# PATCH /account/billing-email request.
|
|
18
|
+
class UpdateBillingEmailRequest < ApiModelBase
|
|
19
|
+
# Address that receives invoices and receipts.
|
|
20
|
+
attr_accessor :email
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'email' => :'email'
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Returns attribute mapping this model knows about
|
|
30
|
+
def self.acceptable_attribute_map
|
|
31
|
+
attribute_map
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Returns all the JSON keys this model knows about
|
|
35
|
+
def self.acceptable_attributes
|
|
36
|
+
acceptable_attribute_map.values
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Attribute type mapping.
|
|
40
|
+
def self.openapi_types
|
|
41
|
+
{
|
|
42
|
+
:'email' => :'String'
|
|
43
|
+
}
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# List of attributes with nullable: true
|
|
47
|
+
def self.openapi_nullable
|
|
48
|
+
Set.new([
|
|
49
|
+
])
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Initializes the object
|
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
54
|
+
def initialize(attributes = {})
|
|
55
|
+
if (!attributes.is_a?(Hash))
|
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::UpdateBillingEmailRequest` initialize method"
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
60
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::UpdateBillingEmailRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
64
|
+
end
|
|
65
|
+
h[k.to_sym] = v
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if attributes.key?(:'email')
|
|
69
|
+
self.email = attributes[:'email']
|
|
70
|
+
else
|
|
71
|
+
self.email = 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 @email.nil?
|
|
81
|
+
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if @email.to_s.length > 320
|
|
85
|
+
invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 320.')
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if @email.to_s.length < 3
|
|
89
|
+
invalid_properties.push('invalid value for "email", the character length must be greater than or equal to 3.')
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
invalid_properties
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Check to see if the all the properties in the model are valid
|
|
96
|
+
# @return true if the model is valid
|
|
97
|
+
def valid?
|
|
98
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
99
|
+
return false if @email.nil?
|
|
100
|
+
return false if @email.to_s.length > 320
|
|
101
|
+
return false if @email.to_s.length < 3
|
|
102
|
+
true
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Custom attribute writer method with validation
|
|
106
|
+
# @param [Object] email Value to be assigned
|
|
107
|
+
def email=(email)
|
|
108
|
+
if email.nil?
|
|
109
|
+
fail ArgumentError, 'email cannot be nil'
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if email.to_s.length > 320
|
|
113
|
+
fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 320.'
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if email.to_s.length < 3
|
|
117
|
+
fail ArgumentError, 'invalid value for "email", the character length must be greater than or equal to 3.'
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
@email = email
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Checks equality by comparing each attribute.
|
|
124
|
+
# @param [Object] Object to be compared
|
|
125
|
+
def ==(o)
|
|
126
|
+
return true if self.equal?(o)
|
|
127
|
+
self.class == o.class &&
|
|
128
|
+
email == o.email
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# @see the `==` method
|
|
132
|
+
# @param [Object] Object to be compared
|
|
133
|
+
def eql?(o)
|
|
134
|
+
self == o
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Calculates hash code according to all attributes.
|
|
138
|
+
# @return [Integer] Hash code
|
|
139
|
+
def hash
|
|
140
|
+
[email].hash
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Builds the object from hash
|
|
144
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
145
|
+
# @return [Object] Returns the model itself
|
|
146
|
+
def self.build_from_hash(attributes)
|
|
147
|
+
return nil unless attributes.is_a?(Hash)
|
|
148
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
149
|
+
transformed_hash = {}
|
|
150
|
+
openapi_types.each_pair do |key, type|
|
|
151
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
152
|
+
transformed_hash["#{key}"] = nil
|
|
153
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
154
|
+
# check to ensure the input is an array given that the attribute
|
|
155
|
+
# is documented as an array but the input is not
|
|
156
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
157
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
158
|
+
end
|
|
159
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
160
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
new(transformed_hash)
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Returns the object in the form of hash
|
|
167
|
+
# @return [Hash] Returns the object in the form of hash
|
|
168
|
+
def to_hash
|
|
169
|
+
hash = {}
|
|
170
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
171
|
+
value = self.send(attr)
|
|
172
|
+
if value.nil?
|
|
173
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
174
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
hash[param] = _to_hash(value)
|
|
178
|
+
end
|
|
179
|
+
hash
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
end
|
|
@@ -38,6 +38,30 @@ module Pingram
|
|
|
38
38
|
# Link tags for EMAIL_CLICK events.
|
|
39
39
|
attr_accessor :clicked_link_tags
|
|
40
40
|
|
|
41
|
+
# Account id, for ACCOUNT_USAGE.
|
|
42
|
+
attr_accessor :account_id
|
|
43
|
+
|
|
44
|
+
# Billing period start (YYYY-MM-DD), for ACCOUNT_USAGE.
|
|
45
|
+
attr_accessor :year_month_day
|
|
46
|
+
|
|
47
|
+
# Date the monthly budget resets (YYYY-MM-DD), for ACCOUNT_USAGE.
|
|
48
|
+
attr_accessor :resets_on
|
|
49
|
+
|
|
50
|
+
# Whole percent of the monthly budget used, for ACCOUNT_USAGE.
|
|
51
|
+
attr_accessor :percent
|
|
52
|
+
|
|
53
|
+
# Amount spent against the monthly budget, for ACCOUNT_USAGE.
|
|
54
|
+
attr_accessor :spent
|
|
55
|
+
|
|
56
|
+
# Monthly budget the percent was measured against, for ACCOUNT_USAGE.
|
|
57
|
+
attr_accessor :cost_cap
|
|
58
|
+
|
|
59
|
+
# Whether the account raises its budget automatically, for ACCOUNT_USAGE.
|
|
60
|
+
attr_accessor :auto_upgrade
|
|
61
|
+
|
|
62
|
+
# Per-channel volume and cost for the current period, for ACCOUNT_USAGE.
|
|
63
|
+
attr_accessor :usage
|
|
64
|
+
|
|
41
65
|
class EnumAttributeValidator
|
|
42
66
|
attr_reader :datatype
|
|
43
67
|
attr_reader :allowable_values
|
|
@@ -70,7 +94,15 @@ module Pingram
|
|
|
70
94
|
:'tracking_id' => :'trackingId',
|
|
71
95
|
:'failure_code' => :'failureCode',
|
|
72
96
|
:'clicked_link' => :'clickedLink',
|
|
73
|
-
:'clicked_link_tags' => :'clickedLinkTags'
|
|
97
|
+
:'clicked_link_tags' => :'clickedLinkTags',
|
|
98
|
+
:'account_id' => :'accountId',
|
|
99
|
+
:'year_month_day' => :'yearMonthDay',
|
|
100
|
+
:'resets_on' => :'resetsOn',
|
|
101
|
+
:'percent' => :'percent',
|
|
102
|
+
:'spent' => :'spent',
|
|
103
|
+
:'cost_cap' => :'costCap',
|
|
104
|
+
:'auto_upgrade' => :'autoUpgrade',
|
|
105
|
+
:'usage' => :'usage'
|
|
74
106
|
}
|
|
75
107
|
end
|
|
76
108
|
|
|
@@ -94,7 +126,15 @@ module Pingram
|
|
|
94
126
|
:'tracking_id' => :'String',
|
|
95
127
|
:'failure_code' => :'String',
|
|
96
128
|
:'clicked_link' => :'String',
|
|
97
|
-
:'clicked_link_tags' => :'Hash<String, Array<String>>'
|
|
129
|
+
:'clicked_link_tags' => :'Hash<String, Array<String>>',
|
|
130
|
+
:'account_id' => :'String',
|
|
131
|
+
:'year_month_day' => :'String',
|
|
132
|
+
:'resets_on' => :'String',
|
|
133
|
+
:'percent' => :'Float',
|
|
134
|
+
:'spent' => :'Float',
|
|
135
|
+
:'cost_cap' => :'Float',
|
|
136
|
+
:'auto_upgrade' => :'Boolean',
|
|
137
|
+
:'usage' => :'Hash<String, WebhookEventUsageValue>'
|
|
98
138
|
}
|
|
99
139
|
end
|
|
100
140
|
|
|
@@ -163,6 +203,40 @@ module Pingram
|
|
|
163
203
|
self.clicked_link_tags = value
|
|
164
204
|
end
|
|
165
205
|
end
|
|
206
|
+
|
|
207
|
+
if attributes.key?(:'account_id')
|
|
208
|
+
self.account_id = attributes[:'account_id']
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
if attributes.key?(:'year_month_day')
|
|
212
|
+
self.year_month_day = attributes[:'year_month_day']
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
if attributes.key?(:'resets_on')
|
|
216
|
+
self.resets_on = attributes[:'resets_on']
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
if attributes.key?(:'percent')
|
|
220
|
+
self.percent = attributes[:'percent']
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
if attributes.key?(:'spent')
|
|
224
|
+
self.spent = attributes[:'spent']
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
if attributes.key?(:'cost_cap')
|
|
228
|
+
self.cost_cap = attributes[:'cost_cap']
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
if attributes.key?(:'auto_upgrade')
|
|
232
|
+
self.auto_upgrade = attributes[:'auto_upgrade']
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
if attributes.key?(:'usage')
|
|
236
|
+
if (value = attributes[:'usage']).is_a?(Hash)
|
|
237
|
+
self.usage = value
|
|
238
|
+
end
|
|
239
|
+
end
|
|
166
240
|
end
|
|
167
241
|
|
|
168
242
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -198,7 +272,7 @@ module Pingram
|
|
|
198
272
|
def valid?
|
|
199
273
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
200
274
|
return false if @event_type.nil?
|
|
201
|
-
event_type_validator = EnumAttributeValidator.new('String', ["EMAIL_OPEN", "EMAIL_CLICK", "EMAIL_FAILED", "EMAIL_DELIVERED", "EMAIL_UNSUBSCRIBE", "EMAIL_INBOUND", "INAPP_WEB_FAILED", "INAPP_WEB_UNSUBSCRIBE", "SMS_DELIVERED", "SMS_FAILED", "SMS_UNSUBSCRIBE", "SMS_SUBSCRIBE", "SMS_INBOUND", "PUSH_FAILED", "PUSH_UNSUBSCRIBE", "CALL_FAILED", "CALL_UNSUBSCRIBE", "WEB_PUSH_FAILED", "WEB_PUSH_UNSUBSCRIBE", "SLACK_FAILED", "SLACK_UNSUBSCRIBE"])
|
|
275
|
+
event_type_validator = EnumAttributeValidator.new('String', ["EMAIL_OPEN", "EMAIL_CLICK", "EMAIL_FAILED", "EMAIL_DELIVERED", "EMAIL_UNSUBSCRIBE", "EMAIL_INBOUND", "INAPP_WEB_FAILED", "INAPP_WEB_UNSUBSCRIBE", "SMS_DELIVERED", "SMS_FAILED", "SMS_UNSUBSCRIBE", "SMS_SUBSCRIBE", "SMS_INBOUND", "PUSH_FAILED", "PUSH_UNSUBSCRIBE", "CALL_FAILED", "CALL_UNSUBSCRIBE", "WEB_PUSH_FAILED", "WEB_PUSH_UNSUBSCRIBE", "SLACK_FAILED", "SLACK_UNSUBSCRIBE", "ACCOUNT_USAGE"])
|
|
202
276
|
return false unless event_type_validator.valid?(@event_type)
|
|
203
277
|
return false if @channel.nil?
|
|
204
278
|
return false if @user_id.nil?
|
|
@@ -210,7 +284,7 @@ module Pingram
|
|
|
210
284
|
# Custom attribute writer method checking allowed values (enum).
|
|
211
285
|
# @param [Object] event_type Object to be assigned
|
|
212
286
|
def event_type=(event_type)
|
|
213
|
-
validator = EnumAttributeValidator.new('String', ["EMAIL_OPEN", "EMAIL_CLICK", "EMAIL_FAILED", "EMAIL_DELIVERED", "EMAIL_UNSUBSCRIBE", "EMAIL_INBOUND", "INAPP_WEB_FAILED", "INAPP_WEB_UNSUBSCRIBE", "SMS_DELIVERED", "SMS_FAILED", "SMS_UNSUBSCRIBE", "SMS_SUBSCRIBE", "SMS_INBOUND", "PUSH_FAILED", "PUSH_UNSUBSCRIBE", "CALL_FAILED", "CALL_UNSUBSCRIBE", "WEB_PUSH_FAILED", "WEB_PUSH_UNSUBSCRIBE", "SLACK_FAILED", "SLACK_UNSUBSCRIBE"])
|
|
287
|
+
validator = EnumAttributeValidator.new('String', ["EMAIL_OPEN", "EMAIL_CLICK", "EMAIL_FAILED", "EMAIL_DELIVERED", "EMAIL_UNSUBSCRIBE", "EMAIL_INBOUND", "INAPP_WEB_FAILED", "INAPP_WEB_UNSUBSCRIBE", "SMS_DELIVERED", "SMS_FAILED", "SMS_UNSUBSCRIBE", "SMS_SUBSCRIBE", "SMS_INBOUND", "PUSH_FAILED", "PUSH_UNSUBSCRIBE", "CALL_FAILED", "CALL_UNSUBSCRIBE", "WEB_PUSH_FAILED", "WEB_PUSH_UNSUBSCRIBE", "SLACK_FAILED", "SLACK_UNSUBSCRIBE", "ACCOUNT_USAGE"])
|
|
214
288
|
unless validator.valid?(event_type)
|
|
215
289
|
fail ArgumentError, "invalid value for \"event_type\", must be one of #{validator.allowable_values}."
|
|
216
290
|
end
|
|
@@ -269,7 +343,15 @@ module Pingram
|
|
|
269
343
|
tracking_id == o.tracking_id &&
|
|
270
344
|
failure_code == o.failure_code &&
|
|
271
345
|
clicked_link == o.clicked_link &&
|
|
272
|
-
clicked_link_tags == o.clicked_link_tags
|
|
346
|
+
clicked_link_tags == o.clicked_link_tags &&
|
|
347
|
+
account_id == o.account_id &&
|
|
348
|
+
year_month_day == o.year_month_day &&
|
|
349
|
+
resets_on == o.resets_on &&
|
|
350
|
+
percent == o.percent &&
|
|
351
|
+
spent == o.spent &&
|
|
352
|
+
cost_cap == o.cost_cap &&
|
|
353
|
+
auto_upgrade == o.auto_upgrade &&
|
|
354
|
+
usage == o.usage
|
|
273
355
|
end
|
|
274
356
|
|
|
275
357
|
# @see the `==` method
|
|
@@ -281,7 +363,7 @@ module Pingram
|
|
|
281
363
|
# Calculates hash code according to all attributes.
|
|
282
364
|
# @return [Integer] Hash code
|
|
283
365
|
def hash
|
|
284
|
-
[event_type, channel, user_id, notification_id, tracking_id, failure_code, clicked_link, clicked_link_tags].hash
|
|
366
|
+
[event_type, channel, user_id, notification_id, tracking_id, failure_code, clicked_link, clicked_link_tags, account_id, year_month_day, resets_on, percent, spent, cost_cap, auto_upgrade, usage].hash
|
|
285
367
|
end
|
|
286
368
|
|
|
287
369
|
# Builds the object from hash
|
|
@@ -0,0 +1,193 @@
|
|
|
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
|
+
# Volume and spend for one channel in the current billing period.
|
|
18
|
+
class WebhookEventUsageValue < ApiModelBase
|
|
19
|
+
# Message count, or number-days for NUMBER.
|
|
20
|
+
attr_accessor :count
|
|
21
|
+
|
|
22
|
+
# Spend for this channel in the current billing period.
|
|
23
|
+
attr_accessor :cost
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'count' => :'count',
|
|
29
|
+
:'cost' => :'cost'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Returns all the JSON keys this model knows about
|
|
39
|
+
def self.acceptable_attributes
|
|
40
|
+
acceptable_attribute_map.values
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Attribute type mapping.
|
|
44
|
+
def self.openapi_types
|
|
45
|
+
{
|
|
46
|
+
:'count' => :'Float',
|
|
47
|
+
:'cost' => :'Float'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# List of attributes with nullable: true
|
|
52
|
+
def self.openapi_nullable
|
|
53
|
+
Set.new([
|
|
54
|
+
])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Initializes the object
|
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
59
|
+
def initialize(attributes = {})
|
|
60
|
+
if (!attributes.is_a?(Hash))
|
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::WebhookEventUsageValue` initialize method"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
65
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
67
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::WebhookEventUsageValue`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
69
|
+
end
|
|
70
|
+
h[k.to_sym] = v
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if attributes.key?(:'count')
|
|
74
|
+
self.count = attributes[:'count']
|
|
75
|
+
else
|
|
76
|
+
self.count = nil
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'cost')
|
|
80
|
+
self.cost = attributes[:'cost']
|
|
81
|
+
else
|
|
82
|
+
self.cost = nil
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
87
|
+
# @return Array for valid properties with the reasons
|
|
88
|
+
def list_invalid_properties
|
|
89
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
90
|
+
invalid_properties = Array.new
|
|
91
|
+
if @count.nil?
|
|
92
|
+
invalid_properties.push('invalid value for "count", count cannot be nil.')
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if @cost.nil?
|
|
96
|
+
invalid_properties.push('invalid value for "cost", cost cannot be nil.')
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
invalid_properties
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Check to see if the all the properties in the model are valid
|
|
103
|
+
# @return true if the model is valid
|
|
104
|
+
def valid?
|
|
105
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
106
|
+
return false if @count.nil?
|
|
107
|
+
return false if @cost.nil?
|
|
108
|
+
true
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Custom attribute writer method with validation
|
|
112
|
+
# @param [Object] count Value to be assigned
|
|
113
|
+
def count=(count)
|
|
114
|
+
if count.nil?
|
|
115
|
+
fail ArgumentError, 'count cannot be nil'
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
@count = count
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Custom attribute writer method with validation
|
|
122
|
+
# @param [Object] cost Value to be assigned
|
|
123
|
+
def cost=(cost)
|
|
124
|
+
if cost.nil?
|
|
125
|
+
fail ArgumentError, 'cost cannot be nil'
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
@cost = cost
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Checks equality by comparing each attribute.
|
|
132
|
+
# @param [Object] Object to be compared
|
|
133
|
+
def ==(o)
|
|
134
|
+
return true if self.equal?(o)
|
|
135
|
+
self.class == o.class &&
|
|
136
|
+
count == o.count &&
|
|
137
|
+
cost == o.cost
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# @see the `==` method
|
|
141
|
+
# @param [Object] Object to be compared
|
|
142
|
+
def eql?(o)
|
|
143
|
+
self == o
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Calculates hash code according to all attributes.
|
|
147
|
+
# @return [Integer] Hash code
|
|
148
|
+
def hash
|
|
149
|
+
[count, cost].hash
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Builds the object from hash
|
|
153
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
154
|
+
# @return [Object] Returns the model itself
|
|
155
|
+
def self.build_from_hash(attributes)
|
|
156
|
+
return nil unless attributes.is_a?(Hash)
|
|
157
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
158
|
+
transformed_hash = {}
|
|
159
|
+
openapi_types.each_pair do |key, type|
|
|
160
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
161
|
+
transformed_hash["#{key}"] = nil
|
|
162
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
163
|
+
# check to ensure the input is an array given that the attribute
|
|
164
|
+
# is documented as an array but the input is not
|
|
165
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
166
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
167
|
+
end
|
|
168
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
169
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
new(transformed_hash)
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Returns the object in the form of hash
|
|
176
|
+
# @return [Hash] Returns the object in the form of hash
|
|
177
|
+
def to_hash
|
|
178
|
+
hash = {}
|
|
179
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
180
|
+
value = self.send(attr)
|
|
181
|
+
if value.nil?
|
|
182
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
183
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
hash[param] = _to_hash(value)
|
|
187
|
+
end
|
|
188
|
+
hash
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
end
|
data/lib/pingram/version.rb
CHANGED
data/lib/pingram.rb
CHANGED
|
@@ -25,6 +25,7 @@ require 'pingram/models/accept_invite_response'
|
|
|
25
25
|
require 'pingram/models/account_addresses_response'
|
|
26
26
|
require 'pingram/models/account_addresses_response_addresses_inner'
|
|
27
27
|
require 'pingram/models/account_get_response'
|
|
28
|
+
require 'pingram/models/account_get_response_billing_alerts'
|
|
28
29
|
require 'pingram/models/account_patch_request'
|
|
29
30
|
require 'pingram/models/address_response'
|
|
30
31
|
require 'pingram/models/api_error_body'
|
|
@@ -33,6 +34,7 @@ require 'pingram/models/auto_join_get_response'
|
|
|
33
34
|
require 'pingram/models/auto_join_post_response'
|
|
34
35
|
require 'pingram/models/auto_join_request_body'
|
|
35
36
|
require 'pingram/models/bee_token_v2'
|
|
37
|
+
require 'pingram/models/billing_email'
|
|
36
38
|
require 'pingram/models/billing_post_request_body'
|
|
37
39
|
require 'pingram/models/billing_post_response_body'
|
|
38
40
|
require 'pingram/models/bind_number_request'
|
|
@@ -51,6 +53,7 @@ require 'pingram/models/broadcast_metrics_response'
|
|
|
51
53
|
require 'pingram/models/broadcast_response'
|
|
52
54
|
require 'pingram/models/broadcast_response_audience'
|
|
53
55
|
require 'pingram/models/campaign_webhook_response'
|
|
56
|
+
require 'pingram/models/cancel_subscription_request'
|
|
54
57
|
require 'pingram/models/chained'
|
|
55
58
|
require 'pingram/models/change_email_request'
|
|
56
59
|
require 'pingram/models/change_phone_request'
|
|
@@ -268,6 +271,7 @@ require 'pingram/models/sender_post_body_user'
|
|
|
268
271
|
require 'pingram/models/sender_post_body_web_push'
|
|
269
272
|
require 'pingram/models/sender_post_response'
|
|
270
273
|
require 'pingram/models/set_default_template_request'
|
|
274
|
+
require 'pingram/models/slack_connect_invite_response'
|
|
271
275
|
require 'pingram/models/slack_interactivity_response'
|
|
272
276
|
require 'pingram/models/sub_notification'
|
|
273
277
|
require 'pingram/models/sub_notification_put_request'
|
|
@@ -296,6 +300,7 @@ require 'pingram/models/ten_dlc_campaign_update_request'
|
|
|
296
300
|
require 'pingram/models/transfer'
|
|
297
301
|
require 'pingram/models/unbind_number_response'
|
|
298
302
|
require 'pingram/models/update_address_request'
|
|
303
|
+
require 'pingram/models/update_billing_email_request'
|
|
299
304
|
require 'pingram/models/update_broadcast_request'
|
|
300
305
|
require 'pingram/models/update_voice_agent_request'
|
|
301
306
|
require 'pingram/models/update_voice_agent_response'
|
|
@@ -317,6 +322,7 @@ require 'pingram/models/webhook_endpoint_upsert_request'
|
|
|
317
322
|
require 'pingram/models/webhook_endpoints_response'
|
|
318
323
|
require 'pingram/models/webhook_endpoints_response_endpoints_inner'
|
|
319
324
|
require 'pingram/models/webhook_event'
|
|
325
|
+
require 'pingram/models/webhook_event_usage_value'
|
|
320
326
|
require 'pingram/models/webhook_response'
|
|
321
327
|
|
|
322
328
|
# APIs
|
|
@@ -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.20261006-2546-qc7quu sitelibdir\=./.gem.20261006-2546-qc7quu 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.20261006-2546-qc7quu sitelibdir\=./.gem.20261006-2546-qc7quu
|
|
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.20261006-2546-qc7quu sitelibdir\=./.gem.20261006-2546-qc7quu install
|
|
39
|
+
/usr/bin/install -c -m 0755 byebug.so ./.gem.20261006-2546-qc7quu/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.20261006-2546-qc7quu sitelibdir\=./.gem.20261006-2546-qc7quu 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.20261006-2546-8kmsun sitelibdir\=./.gem.20261006-2546-8kmsun 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.20261006-2546-8kmsun sitelibdir\=./.gem.20261006-2546-8kmsun
|
|
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.20261006-2546-8kmsun sitelibdir\=./.gem.20261006-2546-8kmsun install
|
|
21
|
+
/usr/bin/install -c -m 0755 date_core.so ./.gem.20261006-2546-8kmsun
|
|
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.20261006-2546-8kmsun sitelibdir\=./.gem.20261006-2546-8kmsun 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.20261006-2546-i9imqa sitelibdir\=./.gem.20261006-2546-i9imqa 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.20261006-2546-i9imqa sitelibdir\=./.gem.20261006-2546-i9imqa
|
|
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.20261006-2546-i9imqa sitelibdir\=./.gem.20261006-2546-i9imqa install
|
|
31
|
+
/usr/bin/install -c -m 0755 console.so ./.gem.20261006-2546-i9imqa/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.20261006-2546-i9imqa sitelibdir\=./.gem.20261006-2546-i9imqa clean
|