pingram 1.0.12 → 1.0.14
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/numbers_api.rb +120 -4
- data/lib/pingram/api/sms_api.rb +2 -2
- data/lib/pingram/api_client.rb +1 -1
- data/lib/pingram/models/a2p_registration.rb +1 -1
- data/lib/pingram/models/list_phone_numbers_response.rb +0 -1
- data/lib/pingram/models/list_phone_numbers_response_numbers_inner.rb +196 -5
- data/lib/pingram/models/list_released_phone_numbers_response.rb +166 -0
- data/lib/pingram/models/order_phone_number_request.rb +0 -1
- data/lib/pingram/models/order_phone_number_response.rb +0 -1
- data/lib/pingram/models/organization_usage.rb +29 -2
- data/lib/pingram/models/organization_usage_history_items_inner.rb +29 -2
- data/lib/pingram/models/release_phone_number_response.rb +200 -0
- data/lib/pingram/models/search_available_phone_numbers_response.rb +0 -1
- data/lib/pingram/models/search_available_phone_numbers_response_numbers_inner.rb +31 -4
- data/lib/pingram/models/send_sms_request.rb +19 -33
- data/lib/pingram/version.rb +1 -1
- data/lib/pingram.rb +2 -0
- metadata +4 -2
|
@@ -19,7 +19,7 @@ module Pingram
|
|
|
19
19
|
# Total message usage (EMAIL + INAPP_WEB + WEB_PUSH + PUSH + SLACK)
|
|
20
20
|
attr_accessor :message_usage
|
|
21
21
|
|
|
22
|
-
# Total budget usage in USD (cost_SMS + cost_CALL)
|
|
22
|
+
# Total budget usage in USD (cost_SMS + cost_CALL + cost_NUMBER)
|
|
23
23
|
attr_accessor :budget_usage
|
|
24
24
|
|
|
25
25
|
# SMS cost in USD
|
|
@@ -28,6 +28,9 @@ module Pingram
|
|
|
28
28
|
# Call cost in USD
|
|
29
29
|
attr_accessor :cost_call
|
|
30
30
|
|
|
31
|
+
# Phone number rent in USD
|
|
32
|
+
attr_accessor :cost_number
|
|
33
|
+
|
|
31
34
|
# Per-channel usage breakdown
|
|
32
35
|
attr_accessor :channel_usages
|
|
33
36
|
|
|
@@ -44,6 +47,7 @@ module Pingram
|
|
|
44
47
|
:'budget_usage' => :'budgetUsage',
|
|
45
48
|
:'cost_sms' => :'costSms',
|
|
46
49
|
:'cost_call' => :'costCall',
|
|
50
|
+
:'cost_number' => :'costNumber',
|
|
47
51
|
:'channel_usages' => :'channelUsages',
|
|
48
52
|
:'billing_cycle_start' => :'billingCycleStart',
|
|
49
53
|
:'billing_cycle_end' => :'billingCycleEnd'
|
|
@@ -67,6 +71,7 @@ module Pingram
|
|
|
67
71
|
:'budget_usage' => :'Float',
|
|
68
72
|
:'cost_sms' => :'Float',
|
|
69
73
|
:'cost_call' => :'Float',
|
|
74
|
+
:'cost_number' => :'Float',
|
|
70
75
|
:'channel_usages' => :'Hash<String, Float>',
|
|
71
76
|
:'billing_cycle_start' => :'String',
|
|
72
77
|
:'billing_cycle_end' => :'String'
|
|
@@ -119,6 +124,12 @@ module Pingram
|
|
|
119
124
|
self.cost_call = nil
|
|
120
125
|
end
|
|
121
126
|
|
|
127
|
+
if attributes.key?(:'cost_number')
|
|
128
|
+
self.cost_number = attributes[:'cost_number']
|
|
129
|
+
else
|
|
130
|
+
self.cost_number = nil
|
|
131
|
+
end
|
|
132
|
+
|
|
122
133
|
if attributes.key?(:'channel_usages')
|
|
123
134
|
if (value = attributes[:'channel_usages']).is_a?(Hash)
|
|
124
135
|
self.channel_usages = value
|
|
@@ -161,6 +172,10 @@ module Pingram
|
|
|
161
172
|
invalid_properties.push('invalid value for "cost_call", cost_call cannot be nil.')
|
|
162
173
|
end
|
|
163
174
|
|
|
175
|
+
if @cost_number.nil?
|
|
176
|
+
invalid_properties.push('invalid value for "cost_number", cost_number cannot be nil.')
|
|
177
|
+
end
|
|
178
|
+
|
|
164
179
|
if @channel_usages.nil?
|
|
165
180
|
invalid_properties.push('invalid value for "channel_usages", channel_usages cannot be nil.')
|
|
166
181
|
end
|
|
@@ -184,6 +199,7 @@ module Pingram
|
|
|
184
199
|
return false if @budget_usage.nil?
|
|
185
200
|
return false if @cost_sms.nil?
|
|
186
201
|
return false if @cost_call.nil?
|
|
202
|
+
return false if @cost_number.nil?
|
|
187
203
|
return false if @channel_usages.nil?
|
|
188
204
|
return false if @billing_cycle_start.nil?
|
|
189
205
|
return false if @billing_cycle_end.nil?
|
|
@@ -230,6 +246,16 @@ module Pingram
|
|
|
230
246
|
@cost_call = cost_call
|
|
231
247
|
end
|
|
232
248
|
|
|
249
|
+
# Custom attribute writer method with validation
|
|
250
|
+
# @param [Object] cost_number Value to be assigned
|
|
251
|
+
def cost_number=(cost_number)
|
|
252
|
+
if cost_number.nil?
|
|
253
|
+
fail ArgumentError, 'cost_number cannot be nil'
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
@cost_number = cost_number
|
|
257
|
+
end
|
|
258
|
+
|
|
233
259
|
# Custom attribute writer method with validation
|
|
234
260
|
# @param [Object] channel_usages Value to be assigned
|
|
235
261
|
def channel_usages=(channel_usages)
|
|
@@ -269,6 +295,7 @@ module Pingram
|
|
|
269
295
|
budget_usage == o.budget_usage &&
|
|
270
296
|
cost_sms == o.cost_sms &&
|
|
271
297
|
cost_call == o.cost_call &&
|
|
298
|
+
cost_number == o.cost_number &&
|
|
272
299
|
channel_usages == o.channel_usages &&
|
|
273
300
|
billing_cycle_start == o.billing_cycle_start &&
|
|
274
301
|
billing_cycle_end == o.billing_cycle_end
|
|
@@ -283,7 +310,7 @@ module Pingram
|
|
|
283
310
|
# Calculates hash code according to all attributes.
|
|
284
311
|
# @return [Integer] Hash code
|
|
285
312
|
def hash
|
|
286
|
-
[message_usage, budget_usage, cost_sms, cost_call, channel_usages, billing_cycle_start, billing_cycle_end].hash
|
|
313
|
+
[message_usage, budget_usage, cost_sms, cost_call, cost_number, channel_usages, billing_cycle_start, billing_cycle_end].hash
|
|
287
314
|
end
|
|
288
315
|
|
|
289
316
|
# Builds the object from hash
|
|
@@ -22,7 +22,7 @@ module Pingram
|
|
|
22
22
|
# Total message usage (EMAIL + INAPP_WEB + WEB_PUSH + PUSH + SLACK)
|
|
23
23
|
attr_accessor :message_usage
|
|
24
24
|
|
|
25
|
-
# Total budget usage in USD (cost_SMS + cost_CALL)
|
|
25
|
+
# Total budget usage in USD (cost_SMS + cost_CALL + cost_NUMBER)
|
|
26
26
|
attr_accessor :budget_usage
|
|
27
27
|
|
|
28
28
|
# SMS cost in USD
|
|
@@ -31,6 +31,9 @@ module Pingram
|
|
|
31
31
|
# Call cost in USD
|
|
32
32
|
attr_accessor :cost_call
|
|
33
33
|
|
|
34
|
+
# Phone number rent in USD
|
|
35
|
+
attr_accessor :cost_number
|
|
36
|
+
|
|
34
37
|
# Per-channel usage breakdown
|
|
35
38
|
attr_accessor :channel_usages
|
|
36
39
|
|
|
@@ -42,6 +45,7 @@ module Pingram
|
|
|
42
45
|
:'budget_usage' => :'budgetUsage',
|
|
43
46
|
:'cost_sms' => :'costSms',
|
|
44
47
|
:'cost_call' => :'costCall',
|
|
48
|
+
:'cost_number' => :'costNumber',
|
|
45
49
|
:'channel_usages' => :'channelUsages'
|
|
46
50
|
}
|
|
47
51
|
end
|
|
@@ -64,6 +68,7 @@ module Pingram
|
|
|
64
68
|
:'budget_usage' => :'Float',
|
|
65
69
|
:'cost_sms' => :'Float',
|
|
66
70
|
:'cost_call' => :'Float',
|
|
71
|
+
:'cost_number' => :'Float',
|
|
67
72
|
:'channel_usages' => :'Hash<String, Float>'
|
|
68
73
|
}
|
|
69
74
|
end
|
|
@@ -120,6 +125,12 @@ module Pingram
|
|
|
120
125
|
self.cost_call = nil
|
|
121
126
|
end
|
|
122
127
|
|
|
128
|
+
if attributes.key?(:'cost_number')
|
|
129
|
+
self.cost_number = attributes[:'cost_number']
|
|
130
|
+
else
|
|
131
|
+
self.cost_number = nil
|
|
132
|
+
end
|
|
133
|
+
|
|
123
134
|
if attributes.key?(:'channel_usages')
|
|
124
135
|
if (value = attributes[:'channel_usages']).is_a?(Hash)
|
|
125
136
|
self.channel_usages = value
|
|
@@ -154,6 +165,10 @@ module Pingram
|
|
|
154
165
|
invalid_properties.push('invalid value for "cost_call", cost_call cannot be nil.')
|
|
155
166
|
end
|
|
156
167
|
|
|
168
|
+
if @cost_number.nil?
|
|
169
|
+
invalid_properties.push('invalid value for "cost_number", cost_number cannot be nil.')
|
|
170
|
+
end
|
|
171
|
+
|
|
157
172
|
if @channel_usages.nil?
|
|
158
173
|
invalid_properties.push('invalid value for "channel_usages", channel_usages cannot be nil.')
|
|
159
174
|
end
|
|
@@ -170,6 +185,7 @@ module Pingram
|
|
|
170
185
|
return false if @budget_usage.nil?
|
|
171
186
|
return false if @cost_sms.nil?
|
|
172
187
|
return false if @cost_call.nil?
|
|
188
|
+
return false if @cost_number.nil?
|
|
173
189
|
return false if @channel_usages.nil?
|
|
174
190
|
true
|
|
175
191
|
end
|
|
@@ -224,6 +240,16 @@ module Pingram
|
|
|
224
240
|
@cost_call = cost_call
|
|
225
241
|
end
|
|
226
242
|
|
|
243
|
+
# Custom attribute writer method with validation
|
|
244
|
+
# @param [Object] cost_number Value to be assigned
|
|
245
|
+
def cost_number=(cost_number)
|
|
246
|
+
if cost_number.nil?
|
|
247
|
+
fail ArgumentError, 'cost_number cannot be nil'
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
@cost_number = cost_number
|
|
251
|
+
end
|
|
252
|
+
|
|
227
253
|
# Custom attribute writer method with validation
|
|
228
254
|
# @param [Object] channel_usages Value to be assigned
|
|
229
255
|
def channel_usages=(channel_usages)
|
|
@@ -244,6 +270,7 @@ module Pingram
|
|
|
244
270
|
budget_usage == o.budget_usage &&
|
|
245
271
|
cost_sms == o.cost_sms &&
|
|
246
272
|
cost_call == o.cost_call &&
|
|
273
|
+
cost_number == o.cost_number &&
|
|
247
274
|
channel_usages == o.channel_usages
|
|
248
275
|
end
|
|
249
276
|
|
|
@@ -256,7 +283,7 @@ module Pingram
|
|
|
256
283
|
# Calculates hash code according to all attributes.
|
|
257
284
|
# @return [Integer] Hash code
|
|
258
285
|
def hash
|
|
259
|
-
[year_month, message_usage, budget_usage, cost_sms, cost_call, channel_usages].hash
|
|
286
|
+
[year_month, message_usage, budget_usage, cost_sms, cost_call, cost_number, channel_usages].hash
|
|
260
287
|
end
|
|
261
288
|
|
|
262
289
|
# Builds the object from hash
|
|
@@ -0,0 +1,200 @@
|
|
|
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 ReleasePhoneNumberResponse < ApiModelBase
|
|
18
|
+
attr_accessor :phone_number
|
|
19
|
+
|
|
20
|
+
attr_accessor :released
|
|
21
|
+
|
|
22
|
+
# ISO timestamp when the number was released
|
|
23
|
+
attr_accessor :released_at
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'phone_number' => :'phoneNumber',
|
|
29
|
+
:'released' => :'released',
|
|
30
|
+
:'released_at' => :'releasedAt'
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Returns attribute mapping this model knows about
|
|
35
|
+
def self.acceptable_attribute_map
|
|
36
|
+
attribute_map
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns all the JSON keys this model knows about
|
|
40
|
+
def self.acceptable_attributes
|
|
41
|
+
acceptable_attribute_map.values
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Attribute type mapping.
|
|
45
|
+
def self.openapi_types
|
|
46
|
+
{
|
|
47
|
+
:'phone_number' => :'String',
|
|
48
|
+
:'released' => :'Boolean',
|
|
49
|
+
:'released_at' => :'String'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# List of attributes with nullable: true
|
|
54
|
+
def self.openapi_nullable
|
|
55
|
+
Set.new([
|
|
56
|
+
])
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Initializes the object
|
|
60
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
61
|
+
def initialize(attributes = {})
|
|
62
|
+
if (!attributes.is_a?(Hash))
|
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::ReleasePhoneNumberResponse` initialize method"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
67
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
68
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
69
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::ReleasePhoneNumberResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
71
|
+
end
|
|
72
|
+
h[k.to_sym] = v
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'phone_number')
|
|
76
|
+
self.phone_number = attributes[:'phone_number']
|
|
77
|
+
else
|
|
78
|
+
self.phone_number = nil
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'released')
|
|
82
|
+
self.released = attributes[:'released']
|
|
83
|
+
else
|
|
84
|
+
self.released = nil
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
if attributes.key?(:'released_at')
|
|
88
|
+
self.released_at = attributes[:'released_at']
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
93
|
+
# @return Array for valid properties with the reasons
|
|
94
|
+
def list_invalid_properties
|
|
95
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
96
|
+
invalid_properties = Array.new
|
|
97
|
+
if @phone_number.nil?
|
|
98
|
+
invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if @released.nil?
|
|
102
|
+
invalid_properties.push('invalid value for "released", released cannot be nil.')
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
invalid_properties
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Check to see if the all the properties in the model are valid
|
|
109
|
+
# @return true if the model is valid
|
|
110
|
+
def valid?
|
|
111
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
112
|
+
return false if @phone_number.nil?
|
|
113
|
+
return false if @released.nil?
|
|
114
|
+
true
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Custom attribute writer method with validation
|
|
118
|
+
# @param [Object] phone_number Value to be assigned
|
|
119
|
+
def phone_number=(phone_number)
|
|
120
|
+
if phone_number.nil?
|
|
121
|
+
fail ArgumentError, 'phone_number cannot be nil'
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
@phone_number = phone_number
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Custom attribute writer method with validation
|
|
128
|
+
# @param [Object] released Value to be assigned
|
|
129
|
+
def released=(released)
|
|
130
|
+
if released.nil?
|
|
131
|
+
fail ArgumentError, 'released cannot be nil'
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
@released = released
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Checks equality by comparing each attribute.
|
|
138
|
+
# @param [Object] Object to be compared
|
|
139
|
+
def ==(o)
|
|
140
|
+
return true if self.equal?(o)
|
|
141
|
+
self.class == o.class &&
|
|
142
|
+
phone_number == o.phone_number &&
|
|
143
|
+
released == o.released &&
|
|
144
|
+
released_at == o.released_at
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# @see the `==` method
|
|
148
|
+
# @param [Object] Object to be compared
|
|
149
|
+
def eql?(o)
|
|
150
|
+
self == o
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Calculates hash code according to all attributes.
|
|
154
|
+
# @return [Integer] Hash code
|
|
155
|
+
def hash
|
|
156
|
+
[phone_number, released, released_at].hash
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Builds the object from hash
|
|
160
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
161
|
+
# @return [Object] Returns the model itself
|
|
162
|
+
def self.build_from_hash(attributes)
|
|
163
|
+
return nil unless attributes.is_a?(Hash)
|
|
164
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
165
|
+
transformed_hash = {}
|
|
166
|
+
openapi_types.each_pair do |key, type|
|
|
167
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
168
|
+
transformed_hash["#{key}"] = nil
|
|
169
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
170
|
+
# check to ensure the input is an array given that the attribute
|
|
171
|
+
# is documented as an array but the input is not
|
|
172
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
173
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
174
|
+
end
|
|
175
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
176
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
new(transformed_hash)
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Returns the object in the form of hash
|
|
183
|
+
# @return [Hash] Returns the object in the form of hash
|
|
184
|
+
def to_hash
|
|
185
|
+
hash = {}
|
|
186
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
187
|
+
value = self.send(attr)
|
|
188
|
+
if value.nil?
|
|
189
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
190
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
hash[param] = _to_hash(value)
|
|
194
|
+
end
|
|
195
|
+
hash
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
end
|
|
@@ -29,6 +29,9 @@ module Pingram
|
|
|
29
29
|
# e.g. sms, voice, mms
|
|
30
30
|
attr_accessor :features
|
|
31
31
|
|
|
32
|
+
# Monthly cost in USD
|
|
33
|
+
attr_accessor :monthly_price
|
|
34
|
+
|
|
32
35
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
36
|
def self.attribute_map
|
|
34
37
|
{
|
|
@@ -36,7 +39,8 @@ module Pingram
|
|
|
36
39
|
:'locality' => :'locality',
|
|
37
40
|
:'administrative_area' => :'administrativeArea',
|
|
38
41
|
:'phone_number_type' => :'phoneNumberType',
|
|
39
|
-
:'features' => :'features'
|
|
42
|
+
:'features' => :'features',
|
|
43
|
+
:'monthly_price' => :'monthlyPrice'
|
|
40
44
|
}
|
|
41
45
|
end
|
|
42
46
|
|
|
@@ -57,7 +61,8 @@ module Pingram
|
|
|
57
61
|
:'locality' => :'String',
|
|
58
62
|
:'administrative_area' => :'String',
|
|
59
63
|
:'phone_number_type' => :'String',
|
|
60
|
-
:'features' => :'Array<String>'
|
|
64
|
+
:'features' => :'Array<String>',
|
|
65
|
+
:'monthly_price' => :'Float'
|
|
61
66
|
}
|
|
62
67
|
end
|
|
63
68
|
|
|
@@ -106,6 +111,12 @@ module Pingram
|
|
|
106
111
|
self.features = value
|
|
107
112
|
end
|
|
108
113
|
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'monthly_price')
|
|
116
|
+
self.monthly_price = attributes[:'monthly_price']
|
|
117
|
+
else
|
|
118
|
+
self.monthly_price = nil
|
|
119
|
+
end
|
|
109
120
|
end
|
|
110
121
|
|
|
111
122
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -117,6 +128,10 @@ module Pingram
|
|
|
117
128
|
invalid_properties.push('invalid value for "phone_number", phone_number cannot be nil.')
|
|
118
129
|
end
|
|
119
130
|
|
|
131
|
+
if @monthly_price.nil?
|
|
132
|
+
invalid_properties.push('invalid value for "monthly_price", monthly_price cannot be nil.')
|
|
133
|
+
end
|
|
134
|
+
|
|
120
135
|
invalid_properties
|
|
121
136
|
end
|
|
122
137
|
|
|
@@ -125,6 +140,7 @@ module Pingram
|
|
|
125
140
|
def valid?
|
|
126
141
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
127
142
|
return false if @phone_number.nil?
|
|
143
|
+
return false if @monthly_price.nil?
|
|
128
144
|
true
|
|
129
145
|
end
|
|
130
146
|
|
|
@@ -138,6 +154,16 @@ module Pingram
|
|
|
138
154
|
@phone_number = phone_number
|
|
139
155
|
end
|
|
140
156
|
|
|
157
|
+
# Custom attribute writer method with validation
|
|
158
|
+
# @param [Object] monthly_price Value to be assigned
|
|
159
|
+
def monthly_price=(monthly_price)
|
|
160
|
+
if monthly_price.nil?
|
|
161
|
+
fail ArgumentError, 'monthly_price cannot be nil'
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
@monthly_price = monthly_price
|
|
165
|
+
end
|
|
166
|
+
|
|
141
167
|
# Checks equality by comparing each attribute.
|
|
142
168
|
# @param [Object] Object to be compared
|
|
143
169
|
def ==(o)
|
|
@@ -147,7 +173,8 @@ module Pingram
|
|
|
147
173
|
locality == o.locality &&
|
|
148
174
|
administrative_area == o.administrative_area &&
|
|
149
175
|
phone_number_type == o.phone_number_type &&
|
|
150
|
-
features == o.features
|
|
176
|
+
features == o.features &&
|
|
177
|
+
monthly_price == o.monthly_price
|
|
151
178
|
end
|
|
152
179
|
|
|
153
180
|
# @see the `==` method
|
|
@@ -159,7 +186,7 @@ module Pingram
|
|
|
159
186
|
# Calculates hash code according to all attributes.
|
|
160
187
|
# @return [Integer] Hash code
|
|
161
188
|
def hash
|
|
162
|
-
[phone_number, locality, administrative_area, phone_number_type, features].hash
|
|
189
|
+
[phone_number, locality, administrative_area, phone_number_type, features, monthly_price].hash
|
|
163
190
|
end
|
|
164
191
|
|
|
165
192
|
# Builds the object from hash
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Pingram
|
|
17
|
-
# Request body for `POST /sms` (send SMS without a template).
|
|
17
|
+
# Request body for `POST /sms` (send SMS or MMS without a template).
|
|
18
18
|
class SendSmsRequest < ApiModelBase
|
|
19
19
|
# The notification type to send.
|
|
20
20
|
attr_accessor :type
|
|
@@ -22,26 +22,27 @@ module Pingram
|
|
|
22
22
|
# The phone number of the recipient.
|
|
23
23
|
attr_accessor :to
|
|
24
24
|
|
|
25
|
-
# The message of the SMS notification.
|
|
25
|
+
# The message of the SMS or MMS notification. Optional when `mediaUrls` is provided.
|
|
26
26
|
attr_accessor :message
|
|
27
27
|
|
|
28
|
+
# Public HTTPS URLs of media to attach (MMS).
|
|
29
|
+
attr_accessor :media_urls
|
|
30
|
+
|
|
28
31
|
# The ISO 8601 datetime to schedule the SMS notification.
|
|
29
32
|
attr_accessor :schedule
|
|
30
33
|
|
|
31
|
-
# Override the sender phone number. Must be a
|
|
34
|
+
# Override the sender phone number. Must be a dedicated number on your Pingram account.
|
|
32
35
|
attr_accessor :from
|
|
33
36
|
|
|
34
|
-
attr_accessor :auto_reply
|
|
35
|
-
|
|
36
37
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
38
|
def self.attribute_map
|
|
38
39
|
{
|
|
39
40
|
:'type' => :'type',
|
|
40
41
|
:'to' => :'to',
|
|
41
42
|
:'message' => :'message',
|
|
43
|
+
:'media_urls' => :'mediaUrls',
|
|
42
44
|
:'schedule' => :'schedule',
|
|
43
|
-
:'from' => :'from'
|
|
44
|
-
:'auto_reply' => :'autoReply'
|
|
45
|
+
:'from' => :'from'
|
|
45
46
|
}
|
|
46
47
|
end
|
|
47
48
|
|
|
@@ -61,9 +62,9 @@ module Pingram
|
|
|
61
62
|
:'type' => :'String',
|
|
62
63
|
:'to' => :'String',
|
|
63
64
|
:'message' => :'String',
|
|
65
|
+
:'media_urls' => :'Array<String>',
|
|
64
66
|
:'schedule' => :'String',
|
|
65
|
-
:'from' => :'String'
|
|
66
|
-
:'auto_reply' => :'SenderPostBodySmsAutoReply'
|
|
67
|
+
:'from' => :'String'
|
|
67
68
|
}
|
|
68
69
|
end
|
|
69
70
|
|
|
@@ -103,8 +104,12 @@ module Pingram
|
|
|
103
104
|
|
|
104
105
|
if attributes.key?(:'message')
|
|
105
106
|
self.message = attributes[:'message']
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'media_urls')
|
|
110
|
+
if (value = attributes[:'media_urls']).is_a?(Array)
|
|
111
|
+
self.media_urls = value
|
|
112
|
+
end
|
|
108
113
|
end
|
|
109
114
|
|
|
110
115
|
if attributes.key?(:'schedule')
|
|
@@ -114,10 +119,6 @@ module Pingram
|
|
|
114
119
|
if attributes.key?(:'from')
|
|
115
120
|
self.from = attributes[:'from']
|
|
116
121
|
end
|
|
117
|
-
|
|
118
|
-
if attributes.key?(:'auto_reply')
|
|
119
|
-
self.auto_reply = attributes[:'auto_reply']
|
|
120
|
-
end
|
|
121
122
|
end
|
|
122
123
|
|
|
123
124
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -133,10 +134,6 @@ module Pingram
|
|
|
133
134
|
invalid_properties.push('invalid value for "to", to cannot be nil.')
|
|
134
135
|
end
|
|
135
136
|
|
|
136
|
-
if @message.nil?
|
|
137
|
-
invalid_properties.push('invalid value for "message", message cannot be nil.')
|
|
138
|
-
end
|
|
139
|
-
|
|
140
137
|
invalid_properties
|
|
141
138
|
end
|
|
142
139
|
|
|
@@ -146,7 +143,6 @@ module Pingram
|
|
|
146
143
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
147
144
|
return false if @type.nil?
|
|
148
145
|
return false if @to.nil?
|
|
149
|
-
return false if @message.nil?
|
|
150
146
|
true
|
|
151
147
|
end
|
|
152
148
|
|
|
@@ -170,16 +166,6 @@ module Pingram
|
|
|
170
166
|
@to = to
|
|
171
167
|
end
|
|
172
168
|
|
|
173
|
-
# Custom attribute writer method with validation
|
|
174
|
-
# @param [Object] message Value to be assigned
|
|
175
|
-
def message=(message)
|
|
176
|
-
if message.nil?
|
|
177
|
-
fail ArgumentError, 'message cannot be nil'
|
|
178
|
-
end
|
|
179
|
-
|
|
180
|
-
@message = message
|
|
181
|
-
end
|
|
182
|
-
|
|
183
169
|
# Checks equality by comparing each attribute.
|
|
184
170
|
# @param [Object] Object to be compared
|
|
185
171
|
def ==(o)
|
|
@@ -188,9 +174,9 @@ module Pingram
|
|
|
188
174
|
type == o.type &&
|
|
189
175
|
to == o.to &&
|
|
190
176
|
message == o.message &&
|
|
177
|
+
media_urls == o.media_urls &&
|
|
191
178
|
schedule == o.schedule &&
|
|
192
|
-
from == o.from
|
|
193
|
-
auto_reply == o.auto_reply
|
|
179
|
+
from == o.from
|
|
194
180
|
end
|
|
195
181
|
|
|
196
182
|
# @see the `==` method
|
|
@@ -202,7 +188,7 @@ module Pingram
|
|
|
202
188
|
# Calculates hash code according to all attributes.
|
|
203
189
|
# @return [Integer] Hash code
|
|
204
190
|
def hash
|
|
205
|
-
[type, to, message, schedule, from
|
|
191
|
+
[type, to, message, media_urls, schedule, from].hash
|
|
206
192
|
end
|
|
207
193
|
|
|
208
194
|
# Builds the object from hash
|
data/lib/pingram/version.rb
CHANGED
data/lib/pingram.rb
CHANGED
|
@@ -140,6 +140,7 @@ require 'pingram/models/intercom_webhook_data_item_any_of_source_author'
|
|
|
140
140
|
require 'pingram/models/invite_post_response'
|
|
141
141
|
require 'pingram/models/list_phone_numbers_response'
|
|
142
142
|
require 'pingram/models/list_phone_numbers_response_numbers_inner'
|
|
143
|
+
require 'pingram/models/list_released_phone_numbers_response'
|
|
143
144
|
require 'pingram/models/log_query_post_body'
|
|
144
145
|
require 'pingram/models/logs_bulk_request'
|
|
145
146
|
require 'pingram/models/logs_get_response'
|
|
@@ -172,6 +173,7 @@ require 'pingram/models/post_senders_request_body'
|
|
|
172
173
|
require 'pingram/models/post_user_request'
|
|
173
174
|
require 'pingram/models/push_settings_fcm_put_request'
|
|
174
175
|
require 'pingram/models/push_settings_fcm_response'
|
|
176
|
+
require 'pingram/models/release_phone_number_response'
|
|
175
177
|
require 'pingram/models/search_available_phone_numbers_response'
|
|
176
178
|
require 'pingram/models/search_available_phone_numbers_response_numbers_inner'
|
|
177
179
|
require 'pingram/models/send_email_api_response'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pingram
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.14
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pingram
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-06-
|
|
11
|
+
date: 2026-06-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -212,6 +212,7 @@ files:
|
|
|
212
212
|
- lib/pingram/models/invite_post_response.rb
|
|
213
213
|
- lib/pingram/models/list_phone_numbers_response.rb
|
|
214
214
|
- lib/pingram/models/list_phone_numbers_response_numbers_inner.rb
|
|
215
|
+
- lib/pingram/models/list_released_phone_numbers_response.rb
|
|
215
216
|
- lib/pingram/models/log_query_post_body.rb
|
|
216
217
|
- lib/pingram/models/logs_bulk_request.rb
|
|
217
218
|
- lib/pingram/models/logs_get_response.rb
|
|
@@ -244,6 +245,7 @@ files:
|
|
|
244
245
|
- lib/pingram/models/post_user_request.rb
|
|
245
246
|
- lib/pingram/models/push_settings_fcm_put_request.rb
|
|
246
247
|
- lib/pingram/models/push_settings_fcm_response.rb
|
|
248
|
+
- lib/pingram/models/release_phone_number_response.rb
|
|
247
249
|
- lib/pingram/models/search_available_phone_numbers_response.rb
|
|
248
250
|
- lib/pingram/models/search_available_phone_numbers_response_numbers_inner.rb
|
|
249
251
|
- lib/pingram/models/send_email_api_response.rb
|