pingram 1.0.5 → 1.0.7

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.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/lib/pingram/api/members_api.rb +10 -10
  4. data/lib/pingram/api/numbers_api.rb +214 -0
  5. data/lib/pingram/api/profile_api.rb +154 -0
  6. data/lib/pingram/api_client.rb +1 -1
  7. data/lib/pingram/client_wrapper.rb +22 -2
  8. data/lib/pingram/models/accept_invite_request.rb +164 -0
  9. data/lib/pingram/models/accept_invite_response.rb +225 -0
  10. data/lib/pingram/models/account_get_response.rb +19 -53
  11. data/lib/pingram/models/auto_join_get_response.rb +16 -16
  12. data/lib/pingram/models/auto_join_post_response.rb +16 -16
  13. data/lib/pingram/models/billing_post_response_body.rb +1 -1
  14. data/lib/pingram/models/change_email_request.rb +164 -0
  15. data/lib/pingram/models/get_members_response_inner.rb +27 -1
  16. data/lib/pingram/models/list_phone_numbers_response.rb +167 -0
  17. data/lib/pingram/models/list_phone_numbers_response_numbers_inner.rb +202 -0
  18. data/lib/pingram/models/order_phone_number_request.rb +166 -0
  19. data/lib/pingram/models/order_phone_number_response.rb +217 -0
  20. data/lib/pingram/models/organization.rb +74 -222
  21. data/lib/pingram/models/phone_verify_confirm_request.rb +190 -0
  22. data/lib/pingram/models/phone_verify_confirm_response.rb +164 -0
  23. data/lib/pingram/models/phone_verify_start_request.rb +190 -0
  24. data/lib/pingram/models/phone_verify_start_response.rb +164 -0
  25. data/lib/pingram/models/search_available_phone_numbers_response.rb +167 -0
  26. data/lib/pingram/models/search_available_phone_numbers_response_numbers_inner.rb +206 -0
  27. data/lib/pingram/models/sender_post_body.rb +2 -0
  28. data/lib/pingram/models/sender_post_body_sms.rb +15 -5
  29. data/lib/pingram/version.rb +1 -1
  30. data/lib/pingram.rb +15 -0
  31. data/vendor/bundle/ruby/3.2.0/cache/parallel-1.28.0.gem +0 -0
  32. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-13.0.0/gem_make.out +5 -5
  33. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/date-3.5.1/gem_make.out +5 -5
  34. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/gem_make.out +5 -5
  35. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/io-console-0.8.2/mkmf.log +3 -3
  36. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  37. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.3.1/gem_make.out +5 -5
  38. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.8.1/gem_make.out +5 -5
  39. data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.2.0/gem_make.out +5 -5
  40. data/vendor/bundle/ruby/3.2.0/gems/parallel-1.28.0/lib/parallel/version.rb +4 -0
  41. data/vendor/bundle/ruby/3.2.0/gems/{parallel-1.27.0 → parallel-1.28.0}/lib/parallel.rb +11 -0
  42. data/vendor/bundle/ruby/3.2.0/specifications/{parallel-1.27.0.gemspec → parallel-1.28.0.gemspec} +4 -4
  43. metadata +22 -7
  44. data/vendor/bundle/ruby/3.2.0/cache/parallel-1.27.0.gem +0 -0
  45. data/vendor/bundle/ruby/3.2.0/gems/parallel-1.27.0/lib/parallel/version.rb +0 -4
  46. /data/vendor/bundle/ruby/3.2.0/gems/{parallel-1.27.0 → parallel-1.28.0}/MIT-LICENSE.txt +0 -0
@@ -15,14 +15,14 @@ require 'time'
15
15
 
16
16
  module Pingram
17
17
  class AutoJoinPostResponse < ApiModelBase
18
- attr_accessor :account_id
18
+ attr_accessor :organization_id
19
19
 
20
20
  attr_accessor :domains
21
21
 
22
22
  # Attribute mapping from ruby-style variable name to JSON key.
23
23
  def self.attribute_map
24
24
  {
25
- :'account_id' => :'accountId',
25
+ :'organization_id' => :'organizationId',
26
26
  :'domains' => :'domains'
27
27
  }
28
28
  end
@@ -40,7 +40,7 @@ module Pingram
40
40
  # Attribute type mapping.
41
41
  def self.openapi_types
42
42
  {
43
- :'account_id' => :'String',
43
+ :'organization_id' => :'String',
44
44
  :'domains' => :'Array<String>'
45
45
  }
46
46
  end
@@ -67,10 +67,10 @@ module Pingram
67
67
  h[k.to_sym] = v
68
68
  }
69
69
 
70
- if attributes.key?(:'account_id')
71
- self.account_id = attributes[:'account_id']
70
+ if attributes.key?(:'organization_id')
71
+ self.organization_id = attributes[:'organization_id']
72
72
  else
73
- self.account_id = nil
73
+ self.organization_id = nil
74
74
  end
75
75
 
76
76
  if attributes.key?(:'domains')
@@ -87,8 +87,8 @@ module Pingram
87
87
  def list_invalid_properties
88
88
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
89
89
  invalid_properties = Array.new
90
- if @account_id.nil?
91
- invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
90
+ if @organization_id.nil?
91
+ invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
92
92
  end
93
93
 
94
94
  if @domains.nil?
@@ -102,19 +102,19 @@ module Pingram
102
102
  # @return true if the model is valid
103
103
  def valid?
104
104
  warn '[DEPRECATED] the `valid?` method is obsolete'
105
- return false if @account_id.nil?
105
+ return false if @organization_id.nil?
106
106
  return false if @domains.nil?
107
107
  true
108
108
  end
109
109
 
110
110
  # Custom attribute writer method with validation
111
- # @param [Object] account_id Value to be assigned
112
- def account_id=(account_id)
113
- if account_id.nil?
114
- fail ArgumentError, 'account_id cannot be nil'
111
+ # @param [Object] organization_id Value to be assigned
112
+ def organization_id=(organization_id)
113
+ if organization_id.nil?
114
+ fail ArgumentError, 'organization_id cannot be nil'
115
115
  end
116
116
 
117
- @account_id = account_id
117
+ @organization_id = organization_id
118
118
  end
119
119
 
120
120
  # Custom attribute writer method with validation
@@ -132,7 +132,7 @@ module Pingram
132
132
  def ==(o)
133
133
  return true if self.equal?(o)
134
134
  self.class == o.class &&
135
- account_id == o.account_id &&
135
+ organization_id == o.organization_id &&
136
136
  domains == o.domains
137
137
  end
138
138
 
@@ -145,7 +145,7 @@ module Pingram
145
145
  # Calculates hash code according to all attributes.
146
146
  # @return [Integer] Hash code
147
147
  def hash
148
- [account_id, domains].hash
148
+ [organization_id, domains].hash
149
149
  end
150
150
 
151
151
  # Builds the object from hash
@@ -48,7 +48,7 @@ module Pingram
48
48
 
49
49
  attr_accessor :subscription_status
50
50
 
51
- # Verification status; internalCap applies when not 'verified'.
51
+ # Verification status.
52
52
  attr_accessor :status
53
53
 
54
54
  attr_accessor :pending_downgrade_cost_cap
@@ -0,0 +1,164 @@
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 ChangeEmailRequest < ApiModelBase
18
+ attr_accessor :new_email
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'new_email' => :'newEmail'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'new_email' => :'String'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::ChangeEmailRequest` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::ChangeEmailRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'new_email')
67
+ self.new_email = attributes[:'new_email']
68
+ else
69
+ self.new_email = nil
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ if @new_email.nil?
79
+ invalid_properties.push('invalid value for "new_email", new_email cannot be nil.')
80
+ end
81
+
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ warn '[DEPRECATED] the `valid?` method is obsolete'
89
+ return false if @new_email.nil?
90
+ true
91
+ end
92
+
93
+ # Custom attribute writer method with validation
94
+ # @param [Object] new_email Value to be assigned
95
+ def new_email=(new_email)
96
+ if new_email.nil?
97
+ fail ArgumentError, 'new_email cannot be nil'
98
+ end
99
+
100
+ @new_email = new_email
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ new_email == o.new_email
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [new_email].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ transformed_hash = {}
130
+ openapi_types.each_pair do |key, type|
131
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = nil
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[attribute_map[key]].is_a?(Array)
137
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
+ end
139
+ elsif !attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
141
+ end
142
+ end
143
+ new(transformed_hash)
144
+ end
145
+
146
+ # Returns the object in the form of hash
147
+ # @return [Hash] Returns the object in the form of hash
148
+ def to_hash
149
+ hash = {}
150
+ self.class.attribute_map.each_pair do |attr, param|
151
+ value = self.send(attr)
152
+ if value.nil?
153
+ is_nullable = self.class.openapi_nullable.include?(attr)
154
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
155
+ end
156
+
157
+ hash[param] = _to_hash(value)
158
+ end
159
+ hash
160
+ end
161
+
162
+ end
163
+
164
+ end
@@ -15,6 +15,8 @@ require 'time'
15
15
 
16
16
  module Pingram
17
17
  class GetMembersResponseInner < ApiModelBase
18
+ attr_accessor :organization_id
19
+
18
20
  attr_accessor :account_id
19
21
 
20
22
  attr_accessor :user_id
@@ -28,6 +30,7 @@ module Pingram
28
30
  # Attribute mapping from ruby-style variable name to JSON key.
29
31
  def self.attribute_map
30
32
  {
33
+ :'organization_id' => :'organizationId',
31
34
  :'account_id' => :'accountId',
32
35
  :'user_id' => :'userId',
33
36
  :'created_at' => :'createdAt',
@@ -49,6 +52,7 @@ module Pingram
49
52
  # Attribute type mapping.
50
53
  def self.openapi_types
51
54
  {
55
+ :'organization_id' => :'String',
52
56
  :'account_id' => :'String',
53
57
  :'user_id' => :'String',
54
58
  :'created_at' => :'String',
@@ -79,6 +83,12 @@ module Pingram
79
83
  h[k.to_sym] = v
80
84
  }
81
85
 
86
+ if attributes.key?(:'organization_id')
87
+ self.organization_id = attributes[:'organization_id']
88
+ else
89
+ self.organization_id = nil
90
+ end
91
+
82
92
  if attributes.key?(:'account_id')
83
93
  self.account_id = attributes[:'account_id']
84
94
  else
@@ -113,6 +123,10 @@ module Pingram
113
123
  def list_invalid_properties
114
124
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
115
125
  invalid_properties = Array.new
126
+ if @organization_id.nil?
127
+ invalid_properties.push('invalid value for "organization_id", organization_id cannot be nil.')
128
+ end
129
+
116
130
  if @account_id.nil?
117
131
  invalid_properties.push('invalid value for "account_id", account_id cannot be nil.')
118
132
  end
@@ -132,12 +146,23 @@ module Pingram
132
146
  # @return true if the model is valid
133
147
  def valid?
134
148
  warn '[DEPRECATED] the `valid?` method is obsolete'
149
+ return false if @organization_id.nil?
135
150
  return false if @account_id.nil?
136
151
  return false if @user_id.nil?
137
152
  return false if @created_at.nil?
138
153
  true
139
154
  end
140
155
 
156
+ # Custom attribute writer method with validation
157
+ # @param [Object] organization_id Value to be assigned
158
+ def organization_id=(organization_id)
159
+ if organization_id.nil?
160
+ fail ArgumentError, 'organization_id cannot be nil'
161
+ end
162
+
163
+ @organization_id = organization_id
164
+ end
165
+
141
166
  # Custom attribute writer method with validation
142
167
  # @param [Object] account_id Value to be assigned
143
168
  def account_id=(account_id)
@@ -173,6 +198,7 @@ module Pingram
173
198
  def ==(o)
174
199
  return true if self.equal?(o)
175
200
  self.class == o.class &&
201
+ organization_id == o.organization_id &&
176
202
  account_id == o.account_id &&
177
203
  user_id == o.user_id &&
178
204
  created_at == o.created_at &&
@@ -189,7 +215,7 @@ module Pingram
189
215
  # Calculates hash code according to all attributes.
190
216
  # @return [Integer] Hash code
191
217
  def hash
192
- [account_id, user_id, created_at, email, groups].hash
218
+ [organization_id, account_id, user_id, created_at, email, groups].hash
193
219
  end
194
220
 
195
221
  # Builds the object from hash
@@ -0,0 +1,167 @@
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
+ # Response for GET /numbers/list
18
+ class ListPhoneNumbersResponse < ApiModelBase
19
+ attr_accessor :numbers
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'numbers' => :'numbers'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'numbers' => :'Array<ListPhoneNumbersResponseNumbersInner>'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Pingram::ListPhoneNumbersResponse` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ acceptable_attribute_map = self.class.acceptable_attribute_map
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!acceptable_attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Pingram::ListPhoneNumbersResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'numbers')
68
+ if (value = attributes[:'numbers']).is_a?(Array)
69
+ self.numbers = value
70
+ end
71
+ else
72
+ self.numbers = nil
73
+ end
74
+ end
75
+
76
+ # Show invalid properties with the reasons. Usually used together with valid?
77
+ # @return Array for valid properties with the reasons
78
+ def list_invalid_properties
79
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
80
+ invalid_properties = Array.new
81
+ if @numbers.nil?
82
+ invalid_properties.push('invalid value for "numbers", numbers cannot be nil.')
83
+ end
84
+
85
+ invalid_properties
86
+ end
87
+
88
+ # Check to see if the all the properties in the model are valid
89
+ # @return true if the model is valid
90
+ def valid?
91
+ warn '[DEPRECATED] the `valid?` method is obsolete'
92
+ return false if @numbers.nil?
93
+ true
94
+ end
95
+
96
+ # Custom attribute writer method with validation
97
+ # @param [Object] numbers Value to be assigned
98
+ def numbers=(numbers)
99
+ if numbers.nil?
100
+ fail ArgumentError, 'numbers cannot be nil'
101
+ end
102
+
103
+ @numbers = numbers
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param [Object] Object to be compared
108
+ def ==(o)
109
+ return true if self.equal?(o)
110
+ self.class == o.class &&
111
+ numbers == o.numbers
112
+ end
113
+
114
+ # @see the `==` method
115
+ # @param [Object] Object to be compared
116
+ def eql?(o)
117
+ self == o
118
+ end
119
+
120
+ # Calculates hash code according to all attributes.
121
+ # @return [Integer] Hash code
122
+ def hash
123
+ [numbers].hash
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def self.build_from_hash(attributes)
130
+ return nil unless attributes.is_a?(Hash)
131
+ attributes = attributes.transform_keys(&:to_sym)
132
+ transformed_hash = {}
133
+ openapi_types.each_pair do |key, type|
134
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
135
+ transformed_hash["#{key}"] = nil
136
+ elsif type =~ /\AArray<(.*)>/i
137
+ # check to ensure the input is an array given that the attribute
138
+ # is documented as an array but the input is not
139
+ if attributes[attribute_map[key]].is_a?(Array)
140
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
141
+ end
142
+ elsif !attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
144
+ end
145
+ end
146
+ new(transformed_hash)
147
+ end
148
+
149
+ # Returns the object in the form of hash
150
+ # @return [Hash] Returns the object in the form of hash
151
+ def to_hash
152
+ hash = {}
153
+ self.class.attribute_map.each_pair do |attr, param|
154
+ value = self.send(attr)
155
+ if value.nil?
156
+ is_nullable = self.class.openapi_nullable.include?(attr)
157
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
158
+ end
159
+
160
+ hash[param] = _to_hash(value)
161
+ end
162
+ hash
163
+ end
164
+
165
+ end
166
+
167
+ end