surge_api 0.18.0 → 0.19.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d65004cf163c9724f560bd9541e0f55ceabd3d516e6938d318f7ab17302d0880
4
- data.tar.gz: d80c1e25b422f575977b4f8a073640aae972e50492e7b1430b3c7835193c22a6
3
+ metadata.gz: 4e4a0bcd739442f5fcd6b9ca030978f0da11f700af746fac3675be506613fea9
4
+ data.tar.gz: c87b52cbe1bc4ebf481ba325bf303df5789b149eb4b8873d9a4d5f526416db69
5
5
  SHA512:
6
- metadata.gz: be50b1c68afb192da466f0bc4bc3d17f2c413ecdcbee12aab3fa7ea5f60b0346098dea593c83bee5802ac7806db14c7f3e0d726237414445c3bcb1989cc89930
7
- data.tar.gz: 0c9ff556f313c28bff2152bf9670846441f797cfd81476bde254983534e4bead99b06eec575455ea89e2daf32903d39bdeee679eed0c142051d6877719fd2053
6
+ metadata.gz: c8c6a4eae6015cdcc0e950d1f629194ea88d7df136c469c5859c49a5c65a47e05cecca62d6ac9c6f42f2d1f35cd9a067d6ae9bb9ed2617f95b49786334597338
7
+ data.tar.gz: 4f82ac61c2cf4a14780d9796fbf67ad90b503ff14ff429eb42b8ac8a652cd6b06ff7ec8cffe244e9c3591f314e9bbff7b9e1c3f142cfff81d045b82bd3f7393b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.19.0 (2026-07-06)
4
+
5
+ Full Changelog: [v0.18.0...v0.19.0](https://github.com/surgeapi/ruby-sdk/compare/v0.18.0...v0.19.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** add phone numbers to call webhooks ([4498bd6](https://github.com/surgeapi/ruby-sdk/commit/4498bd66855cd38f001965b0acda0b61163b0165))
10
+
3
11
  ## 0.18.0 (2026-06-30)
4
12
 
5
13
  Full Changelog: [v0.17.0...v0.18.0](https://github.com/surgeapi/ruby-sdk/compare/v0.17.0...v0.18.0)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "surge_api", "~> 0.18.0"
20
+ gem "surge_api", "~> 0.19.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -68,7 +68,25 @@ module SurgeAPI
68
68
  # @return [Symbol, SurgeAPI::Models::CallEndedWebhookEvent::Data::Status]
69
69
  required :status, enum: -> { SurgeAPI::CallEndedWebhookEvent::Data::Status }
70
70
 
71
- # @!method initialize(id:, contact:, duration:, initiated_at:, status:)
71
+ # @!attribute from
72
+ # The E.164 phone number of the caller
73
+ #
74
+ # @return [String, nil]
75
+ optional :from, String, nil?: true
76
+
77
+ # @!attribute phone_number_id
78
+ # The Surge phone number ID (e.g. pn\_...)
79
+ #
80
+ # @return [String, nil]
81
+ optional :phone_number_id, String, nil?: true
82
+
83
+ # @!attribute to
84
+ # The E.164 phone number of the callee
85
+ #
86
+ # @return [String, nil]
87
+ optional :to, String, nil?: true
88
+
89
+ # @!method initialize(id:, contact:, duration:, initiated_at:, status:, from: nil, phone_number_id: nil, to: nil)
72
90
  # The data associated with the event
73
91
  #
74
92
  # @param id [String] The unique identifier for the call
@@ -80,6 +98,12 @@ module SurgeAPI
80
98
  # @param initiated_at [Time] When the call was initiated
81
99
  #
82
100
  # @param status [Symbol, SurgeAPI::Models::CallEndedWebhookEvent::Data::Status] The status of the call
101
+ #
102
+ # @param from [String, nil] The E.164 phone number of the caller
103
+ #
104
+ # @param phone_number_id [String, nil] The Surge phone number ID (e.g. pn\_...)
105
+ #
106
+ # @param to [String, nil] The E.164 phone number of the callee
83
107
 
84
108
  # The status of the call
85
109
  #
@@ -97,7 +97,25 @@ module SurgeAPI
97
97
  # @return [Symbol, SurgeAPI::Models::RecordingCompletedWebhookEvent::Data::Call::Status]
98
98
  required :status, enum: -> { SurgeAPI::RecordingCompletedWebhookEvent::Data::Call::Status }
99
99
 
100
- # @!method initialize(id:, contact:, duration:, initiated_at:, status:)
100
+ # @!attribute from
101
+ # The E.164 phone number of the caller
102
+ #
103
+ # @return [String, nil]
104
+ optional :from, String, nil?: true
105
+
106
+ # @!attribute phone_number_id
107
+ # The Surge phone number ID (e.g. pn\_...)
108
+ #
109
+ # @return [String, nil]
110
+ optional :phone_number_id, String, nil?: true
111
+
112
+ # @!attribute to
113
+ # The E.164 phone number of the callee
114
+ #
115
+ # @return [String, nil]
116
+ optional :to, String, nil?: true
117
+
118
+ # @!method initialize(id:, contact:, duration:, initiated_at:, status:, from: nil, phone_number_id: nil, to: nil)
101
119
  # The call that produced this recording
102
120
  #
103
121
  # @param id [String] The unique identifier for the call
@@ -109,6 +127,12 @@ module SurgeAPI
109
127
  # @param initiated_at [Time] When the call was initiated
110
128
  #
111
129
  # @param status [Symbol, SurgeAPI::Models::RecordingCompletedWebhookEvent::Data::Call::Status] The status of the call
130
+ #
131
+ # @param from [String, nil] The E.164 phone number of the caller
132
+ #
133
+ # @param phone_number_id [String, nil] The Surge phone number ID (e.g. pn\_...)
134
+ #
135
+ # @param to [String, nil] The E.164 phone number of the callee
112
136
 
113
137
  # The status of the call
114
138
  #
@@ -105,7 +105,25 @@ module SurgeAPI
105
105
  # @return [Symbol, SurgeAPI::Models::VoicemailReceivedWebhookEvent::Data::Call::Status]
106
106
  required :status, enum: -> { SurgeAPI::VoicemailReceivedWebhookEvent::Data::Call::Status }
107
107
 
108
- # @!method initialize(id:, contact:, duration:, initiated_at:, status:)
108
+ # @!attribute from
109
+ # The E.164 phone number of the caller
110
+ #
111
+ # @return [String, nil]
112
+ optional :from, String, nil?: true
113
+
114
+ # @!attribute phone_number_id
115
+ # The Surge phone number ID (e.g. pn\_...)
116
+ #
117
+ # @return [String, nil]
118
+ optional :phone_number_id, String, nil?: true
119
+
120
+ # @!attribute to
121
+ # The E.164 phone number of the callee
122
+ #
123
+ # @return [String, nil]
124
+ optional :to, String, nil?: true
125
+
126
+ # @!method initialize(id:, contact:, duration:, initiated_at:, status:, from: nil, phone_number_id: nil, to: nil)
109
127
  # The call that resulted in this voicemail
110
128
  #
111
129
  # @param id [String] The unique identifier for the call
@@ -117,6 +135,12 @@ module SurgeAPI
117
135
  # @param initiated_at [Time] When the call was initiated
118
136
  #
119
137
  # @param status [Symbol, SurgeAPI::Models::VoicemailReceivedWebhookEvent::Data::Call::Status] The status of the call
138
+ #
139
+ # @param from [String, nil] The E.164 phone number of the caller
140
+ #
141
+ # @param phone_number_id [String, nil] The Surge phone number ID (e.g. pn\_...)
142
+ #
143
+ # @param to [String, nil] The E.164 phone number of the callee
120
144
 
121
145
  # The status of the call
122
146
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SurgeAPI
4
- VERSION = "0.18.0"
4
+ VERSION = "0.19.0"
5
5
  end
@@ -94,6 +94,18 @@ module SurgeAPI
94
94
  end
95
95
  attr_accessor :status
96
96
 
97
+ # The E.164 phone number of the caller
98
+ sig { returns(T.nilable(String)) }
99
+ attr_accessor :from
100
+
101
+ # The Surge phone number ID (e.g. pn\_...)
102
+ sig { returns(T.nilable(String)) }
103
+ attr_accessor :phone_number_id
104
+
105
+ # The E.164 phone number of the callee
106
+ sig { returns(T.nilable(String)) }
107
+ attr_accessor :to
108
+
97
109
  # The data associated with the event
98
110
  sig do
99
111
  params(
@@ -101,7 +113,10 @@ module SurgeAPI
101
113
  contact: SurgeAPI::Contact::OrHash,
102
114
  duration: Integer,
103
115
  initiated_at: Time,
104
- status: SurgeAPI::CallEndedWebhookEvent::Data::Status::OrSymbol
116
+ status: SurgeAPI::CallEndedWebhookEvent::Data::Status::OrSymbol,
117
+ from: T.nilable(String),
118
+ phone_number_id: T.nilable(String),
119
+ to: T.nilable(String)
105
120
  ).returns(T.attached_class)
106
121
  end
107
122
  def self.new(
@@ -114,7 +129,13 @@ module SurgeAPI
114
129
  # When the call was initiated
115
130
  initiated_at:,
116
131
  # The status of the call
117
- status:
132
+ status:,
133
+ # The E.164 phone number of the caller
134
+ from: nil,
135
+ # The Surge phone number ID (e.g. pn\_...)
136
+ phone_number_id: nil,
137
+ # The E.164 phone number of the callee
138
+ to: nil
118
139
  )
119
140
  end
120
141
 
@@ -126,7 +147,10 @@ module SurgeAPI
126
147
  duration: Integer,
127
148
  initiated_at: Time,
128
149
  status:
129
- SurgeAPI::CallEndedWebhookEvent::Data::Status::TaggedSymbol
150
+ SurgeAPI::CallEndedWebhookEvent::Data::Status::TaggedSymbol,
151
+ from: T.nilable(String),
152
+ phone_number_id: T.nilable(String),
153
+ to: T.nilable(String)
130
154
  }
131
155
  )
132
156
  end
@@ -161,6 +161,18 @@ module SurgeAPI
161
161
  end
162
162
  attr_accessor :status
163
163
 
164
+ # The E.164 phone number of the caller
165
+ sig { returns(T.nilable(String)) }
166
+ attr_accessor :from
167
+
168
+ # The Surge phone number ID (e.g. pn\_...)
169
+ sig { returns(T.nilable(String)) }
170
+ attr_accessor :phone_number_id
171
+
172
+ # The E.164 phone number of the callee
173
+ sig { returns(T.nilable(String)) }
174
+ attr_accessor :to
175
+
164
176
  # The call that produced this recording
165
177
  sig do
166
178
  params(
@@ -169,7 +181,10 @@ module SurgeAPI
169
181
  duration: Integer,
170
182
  initiated_at: Time,
171
183
  status:
172
- SurgeAPI::RecordingCompletedWebhookEvent::Data::Call::Status::OrSymbol
184
+ SurgeAPI::RecordingCompletedWebhookEvent::Data::Call::Status::OrSymbol,
185
+ from: T.nilable(String),
186
+ phone_number_id: T.nilable(String),
187
+ to: T.nilable(String)
173
188
  ).returns(T.attached_class)
174
189
  end
175
190
  def self.new(
@@ -182,7 +197,13 @@ module SurgeAPI
182
197
  # When the call was initiated
183
198
  initiated_at:,
184
199
  # The status of the call
185
- status:
200
+ status:,
201
+ # The E.164 phone number of the caller
202
+ from: nil,
203
+ # The Surge phone number ID (e.g. pn\_...)
204
+ phone_number_id: nil,
205
+ # The E.164 phone number of the callee
206
+ to: nil
186
207
  )
187
208
  end
188
209
 
@@ -194,7 +215,10 @@ module SurgeAPI
194
215
  duration: Integer,
195
216
  initiated_at: Time,
196
217
  status:
197
- SurgeAPI::RecordingCompletedWebhookEvent::Data::Call::Status::TaggedSymbol
218
+ SurgeAPI::RecordingCompletedWebhookEvent::Data::Call::Status::TaggedSymbol,
219
+ from: T.nilable(String),
220
+ phone_number_id: T.nilable(String),
221
+ to: T.nilable(String)
198
222
  }
199
223
  )
200
224
  end
@@ -167,6 +167,18 @@ module SurgeAPI
167
167
  end
168
168
  attr_accessor :status
169
169
 
170
+ # The E.164 phone number of the caller
171
+ sig { returns(T.nilable(String)) }
172
+ attr_accessor :from
173
+
174
+ # The Surge phone number ID (e.g. pn\_...)
175
+ sig { returns(T.nilable(String)) }
176
+ attr_accessor :phone_number_id
177
+
178
+ # The E.164 phone number of the callee
179
+ sig { returns(T.nilable(String)) }
180
+ attr_accessor :to
181
+
170
182
  # The call that resulted in this voicemail
171
183
  sig do
172
184
  params(
@@ -175,7 +187,10 @@ module SurgeAPI
175
187
  duration: Integer,
176
188
  initiated_at: Time,
177
189
  status:
178
- SurgeAPI::VoicemailReceivedWebhookEvent::Data::Call::Status::OrSymbol
190
+ SurgeAPI::VoicemailReceivedWebhookEvent::Data::Call::Status::OrSymbol,
191
+ from: T.nilable(String),
192
+ phone_number_id: T.nilable(String),
193
+ to: T.nilable(String)
179
194
  ).returns(T.attached_class)
180
195
  end
181
196
  def self.new(
@@ -188,7 +203,13 @@ module SurgeAPI
188
203
  # When the call was initiated
189
204
  initiated_at:,
190
205
  # The status of the call
191
- status:
206
+ status:,
207
+ # The E.164 phone number of the caller
208
+ from: nil,
209
+ # The Surge phone number ID (e.g. pn\_...)
210
+ phone_number_id: nil,
211
+ # The E.164 phone number of the callee
212
+ to: nil
192
213
  )
193
214
  end
194
215
 
@@ -200,7 +221,10 @@ module SurgeAPI
200
221
  duration: Integer,
201
222
  initiated_at: Time,
202
223
  status:
203
- SurgeAPI::VoicemailReceivedWebhookEvent::Data::Call::Status::TaggedSymbol
224
+ SurgeAPI::VoicemailReceivedWebhookEvent::Data::Call::Status::TaggedSymbol,
225
+ from: T.nilable(String),
226
+ phone_number_id: T.nilable(String),
227
+ to: T.nilable(String)
204
228
  }
205
229
  )
206
230
  end
@@ -37,7 +37,10 @@ module SurgeAPI
37
37
  contact: SurgeAPI::Contact,
38
38
  duration: Integer,
39
39
  initiated_at: Time,
40
- status: SurgeAPI::Models::CallEndedWebhookEvent::Data::status
40
+ status: SurgeAPI::Models::CallEndedWebhookEvent::Data::status,
41
+ from: String?,
42
+ phone_number_id: String?,
43
+ to: String?
41
44
  }
42
45
 
43
46
  class Data < SurgeAPI::Internal::Type::BaseModel
@@ -51,12 +54,21 @@ module SurgeAPI
51
54
 
52
55
  attr_accessor status: SurgeAPI::Models::CallEndedWebhookEvent::Data::status
53
56
 
57
+ attr_accessor from: String?
58
+
59
+ attr_accessor phone_number_id: String?
60
+
61
+ attr_accessor to: String?
62
+
54
63
  def initialize: (
55
64
  id: String,
56
65
  contact: SurgeAPI::Contact,
57
66
  duration: Integer,
58
67
  initiated_at: Time,
59
- status: SurgeAPI::Models::CallEndedWebhookEvent::Data::status
68
+ status: SurgeAPI::Models::CallEndedWebhookEvent::Data::status,
69
+ ?from: String?,
70
+ ?phone_number_id: String?,
71
+ ?to: String?
60
72
  ) -> void
61
73
 
62
74
  def to_hash: -> {
@@ -64,7 +76,10 @@ module SurgeAPI
64
76
  contact: SurgeAPI::Contact,
65
77
  duration: Integer,
66
78
  initiated_at: Time,
67
- status: SurgeAPI::Models::CallEndedWebhookEvent::Data::status
79
+ status: SurgeAPI::Models::CallEndedWebhookEvent::Data::status,
80
+ from: String?,
81
+ phone_number_id: String?,
82
+ to: String?
68
83
  }
69
84
 
70
85
  type status =
@@ -63,7 +63,10 @@ module SurgeAPI
63
63
  contact: SurgeAPI::Contact,
64
64
  duration: Integer,
65
65
  initiated_at: Time,
66
- status: SurgeAPI::Models::RecordingCompletedWebhookEvent::Data::Call::status
66
+ status: SurgeAPI::Models::RecordingCompletedWebhookEvent::Data::Call::status,
67
+ from: String?,
68
+ phone_number_id: String?,
69
+ to: String?
67
70
  }
68
71
 
69
72
  class Call < SurgeAPI::Internal::Type::BaseModel
@@ -77,12 +80,21 @@ module SurgeAPI
77
80
 
78
81
  attr_accessor status: SurgeAPI::Models::RecordingCompletedWebhookEvent::Data::Call::status
79
82
 
83
+ attr_accessor from: String?
84
+
85
+ attr_accessor phone_number_id: String?
86
+
87
+ attr_accessor to: String?
88
+
80
89
  def initialize: (
81
90
  id: String,
82
91
  contact: SurgeAPI::Contact,
83
92
  duration: Integer,
84
93
  initiated_at: Time,
85
- status: SurgeAPI::Models::RecordingCompletedWebhookEvent::Data::Call::status
94
+ status: SurgeAPI::Models::RecordingCompletedWebhookEvent::Data::Call::status,
95
+ ?from: String?,
96
+ ?phone_number_id: String?,
97
+ ?to: String?
86
98
  ) -> void
87
99
 
88
100
  def to_hash: -> {
@@ -90,7 +102,10 @@ module SurgeAPI
90
102
  contact: SurgeAPI::Contact,
91
103
  duration: Integer,
92
104
  initiated_at: Time,
93
- status: SurgeAPI::Models::RecordingCompletedWebhookEvent::Data::Call::status
105
+ status: SurgeAPI::Models::RecordingCompletedWebhookEvent::Data::Call::status,
106
+ from: String?,
107
+ phone_number_id: String?,
108
+ to: String?
94
109
  }
95
110
 
96
111
  type status =
@@ -68,7 +68,10 @@ module SurgeAPI
68
68
  contact: SurgeAPI::Contact,
69
69
  duration: Integer,
70
70
  initiated_at: Time,
71
- status: SurgeAPI::Models::VoicemailReceivedWebhookEvent::Data::Call::status
71
+ status: SurgeAPI::Models::VoicemailReceivedWebhookEvent::Data::Call::status,
72
+ from: String?,
73
+ phone_number_id: String?,
74
+ to: String?
72
75
  }
73
76
 
74
77
  class Call < SurgeAPI::Internal::Type::BaseModel
@@ -82,12 +85,21 @@ module SurgeAPI
82
85
 
83
86
  attr_accessor status: SurgeAPI::Models::VoicemailReceivedWebhookEvent::Data::Call::status
84
87
 
88
+ attr_accessor from: String?
89
+
90
+ attr_accessor phone_number_id: String?
91
+
92
+ attr_accessor to: String?
93
+
85
94
  def initialize: (
86
95
  id: String,
87
96
  contact: SurgeAPI::Contact,
88
97
  duration: Integer,
89
98
  initiated_at: Time,
90
- status: SurgeAPI::Models::VoicemailReceivedWebhookEvent::Data::Call::status
99
+ status: SurgeAPI::Models::VoicemailReceivedWebhookEvent::Data::Call::status,
100
+ ?from: String?,
101
+ ?phone_number_id: String?,
102
+ ?to: String?
91
103
  ) -> void
92
104
 
93
105
  def to_hash: -> {
@@ -95,7 +107,10 @@ module SurgeAPI
95
107
  contact: SurgeAPI::Contact,
96
108
  duration: Integer,
97
109
  initiated_at: Time,
98
- status: SurgeAPI::Models::VoicemailReceivedWebhookEvent::Data::Call::status
110
+ status: SurgeAPI::Models::VoicemailReceivedWebhookEvent::Data::Call::status,
111
+ from: String?,
112
+ phone_number_id: String?,
113
+ to: String?
99
114
  }
100
115
 
101
116
  type status =
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: surge_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Surge
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-30 00:00:00.000000000 Z
11
+ date: 2026-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi