pingram 1.0.11 → 1.0.13
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/organization_api.rb +55 -0
- data/lib/pingram/api_client.rb +1 -1
- data/lib/pingram/models/a2p_registration.rb +1 -1
- data/lib/pingram/models/create_organization_response.rb +216 -0
- 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 +5 -14
- data/lib/pingram/version.rb +1 -1
- data/lib/pingram.rb +3 -0
- metadata +5 -2
|
@@ -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
|
|
@@ -28,11 +28,9 @@ module Pingram
|
|
|
28
28
|
# The ISO 8601 datetime to schedule the SMS notification.
|
|
29
29
|
attr_accessor :schedule
|
|
30
30
|
|
|
31
|
-
# Override the sender phone number. Must be a
|
|
31
|
+
# Override the sender phone number. Must be a dedicated number on your Pingram account.
|
|
32
32
|
attr_accessor :from
|
|
33
33
|
|
|
34
|
-
attr_accessor :auto_reply
|
|
35
|
-
|
|
36
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
35
|
def self.attribute_map
|
|
38
36
|
{
|
|
@@ -40,8 +38,7 @@ module Pingram
|
|
|
40
38
|
:'to' => :'to',
|
|
41
39
|
:'message' => :'message',
|
|
42
40
|
:'schedule' => :'schedule',
|
|
43
|
-
:'from' => :'from'
|
|
44
|
-
:'auto_reply' => :'autoReply'
|
|
41
|
+
:'from' => :'from'
|
|
45
42
|
}
|
|
46
43
|
end
|
|
47
44
|
|
|
@@ -62,8 +59,7 @@ module Pingram
|
|
|
62
59
|
:'to' => :'String',
|
|
63
60
|
:'message' => :'String',
|
|
64
61
|
:'schedule' => :'String',
|
|
65
|
-
:'from' => :'String'
|
|
66
|
-
:'auto_reply' => :'SenderPostBodySmsAutoReply'
|
|
62
|
+
:'from' => :'String'
|
|
67
63
|
}
|
|
68
64
|
end
|
|
69
65
|
|
|
@@ -114,10 +110,6 @@ module Pingram
|
|
|
114
110
|
if attributes.key?(:'from')
|
|
115
111
|
self.from = attributes[:'from']
|
|
116
112
|
end
|
|
117
|
-
|
|
118
|
-
if attributes.key?(:'auto_reply')
|
|
119
|
-
self.auto_reply = attributes[:'auto_reply']
|
|
120
|
-
end
|
|
121
113
|
end
|
|
122
114
|
|
|
123
115
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -189,8 +181,7 @@ module Pingram
|
|
|
189
181
|
to == o.to &&
|
|
190
182
|
message == o.message &&
|
|
191
183
|
schedule == o.schedule &&
|
|
192
|
-
from == o.from
|
|
193
|
-
auto_reply == o.auto_reply
|
|
184
|
+
from == o.from
|
|
194
185
|
end
|
|
195
186
|
|
|
196
187
|
# @see the `==` method
|
|
@@ -202,7 +193,7 @@ module Pingram
|
|
|
202
193
|
# Calculates hash code according to all attributes.
|
|
203
194
|
# @return [Integer] Hash code
|
|
204
195
|
def hash
|
|
205
|
-
[type, to, message, schedule, from
|
|
196
|
+
[type, to, message, schedule, from].hash
|
|
206
197
|
end
|
|
207
198
|
|
|
208
199
|
# Builds the object from hash
|
data/lib/pingram/version.rb
CHANGED
data/lib/pingram.rb
CHANGED
|
@@ -46,6 +46,7 @@ require 'pingram/models/create_account_response'
|
|
|
46
46
|
require 'pingram/models/create_address_request'
|
|
47
47
|
require 'pingram/models/create_key_request'
|
|
48
48
|
require 'pingram/models/create_key_response'
|
|
49
|
+
require 'pingram/models/create_organization_response'
|
|
49
50
|
require 'pingram/models/delete_key_response'
|
|
50
51
|
require 'pingram/models/delete_user_response'
|
|
51
52
|
require 'pingram/models/email_auth_token_post_request'
|
|
@@ -139,6 +140,7 @@ require 'pingram/models/intercom_webhook_data_item_any_of_source_author'
|
|
|
139
140
|
require 'pingram/models/invite_post_response'
|
|
140
141
|
require 'pingram/models/list_phone_numbers_response'
|
|
141
142
|
require 'pingram/models/list_phone_numbers_response_numbers_inner'
|
|
143
|
+
require 'pingram/models/list_released_phone_numbers_response'
|
|
142
144
|
require 'pingram/models/log_query_post_body'
|
|
143
145
|
require 'pingram/models/logs_bulk_request'
|
|
144
146
|
require 'pingram/models/logs_get_response'
|
|
@@ -171,6 +173,7 @@ require 'pingram/models/post_senders_request_body'
|
|
|
171
173
|
require 'pingram/models/post_user_request'
|
|
172
174
|
require 'pingram/models/push_settings_fcm_put_request'
|
|
173
175
|
require 'pingram/models/push_settings_fcm_response'
|
|
176
|
+
require 'pingram/models/release_phone_number_response'
|
|
174
177
|
require 'pingram/models/search_available_phone_numbers_response'
|
|
175
178
|
require 'pingram/models/search_available_phone_numbers_response_numbers_inner'
|
|
176
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.13
|
|
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
|
|
@@ -118,6 +118,7 @@ files:
|
|
|
118
118
|
- lib/pingram/models/create_address_request.rb
|
|
119
119
|
- lib/pingram/models/create_key_request.rb
|
|
120
120
|
- lib/pingram/models/create_key_response.rb
|
|
121
|
+
- lib/pingram/models/create_organization_response.rb
|
|
121
122
|
- lib/pingram/models/delete_key_response.rb
|
|
122
123
|
- lib/pingram/models/delete_user_response.rb
|
|
123
124
|
- lib/pingram/models/email_auth_token_post_request.rb
|
|
@@ -211,6 +212,7 @@ files:
|
|
|
211
212
|
- lib/pingram/models/invite_post_response.rb
|
|
212
213
|
- lib/pingram/models/list_phone_numbers_response.rb
|
|
213
214
|
- lib/pingram/models/list_phone_numbers_response_numbers_inner.rb
|
|
215
|
+
- lib/pingram/models/list_released_phone_numbers_response.rb
|
|
214
216
|
- lib/pingram/models/log_query_post_body.rb
|
|
215
217
|
- lib/pingram/models/logs_bulk_request.rb
|
|
216
218
|
- lib/pingram/models/logs_get_response.rb
|
|
@@ -243,6 +245,7 @@ files:
|
|
|
243
245
|
- lib/pingram/models/post_user_request.rb
|
|
244
246
|
- lib/pingram/models/push_settings_fcm_put_request.rb
|
|
245
247
|
- lib/pingram/models/push_settings_fcm_response.rb
|
|
248
|
+
- lib/pingram/models/release_phone_number_response.rb
|
|
246
249
|
- lib/pingram/models/search_available_phone_numbers_response.rb
|
|
247
250
|
- lib/pingram/models/search_available_phone_numbers_response_numbers_inner.rb
|
|
248
251
|
- lib/pingram/models/send_email_api_response.rb
|