bandwidth-sdk 18.3.0 → 19.0.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.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +27 -21
  3. data/README.md +2 -11
  4. data/Rakefile +1 -1
  5. data/bandwidth.yml +341 -122
  6. data/coverage/.last_run.json +1 -1
  7. data/coverage/.resultset.json +1308 -939
  8. data/coverage/index.html +21197 -17030
  9. data/custom_templates/README.mustache +1 -1
  10. data/custom_templates/api_client.mustache +3 -1
  11. data/custom_templates/configuration.mustache +18 -12
  12. data/custom_templates/gem.mustache +4 -2
  13. data/docs/Callback.md +1 -0
  14. data/docs/CallsApi.md +5 -25
  15. data/docs/ConferencesApi.md +9 -45
  16. data/docs/DisconnectCallback.md +6 -2
  17. data/docs/EndpointsApi.md +5 -25
  18. data/docs/InboundCallback.md +1 -1
  19. data/docs/InboundCallbackMessage.md +2 -0
  20. data/docs/InitiateCallback.md +1 -1
  21. data/docs/LookupResult.md +2 -2
  22. data/docs/MFAApi.md +3 -15
  23. data/docs/MediaApi.md +7 -23
  24. data/docs/Message.md +1 -1
  25. data/docs/MessagesApi.md +2 -10
  26. data/docs/MultiChannelAction.md +3 -3
  27. data/docs/MultiChannelActionCalendarEvent.md +3 -3
  28. data/docs/MultiChannelApi.md +1 -5
  29. data/docs/PhoneNumberLookupApi.md +3 -15
  30. data/docs/RbmActionBase.md +3 -3
  31. data/docs/RbmActionDial.md +3 -3
  32. data/docs/RbmActionOpenUrl.md +3 -3
  33. data/docs/RbmActionViewLocation.md +3 -3
  34. data/docs/RbmSession.md +26 -0
  35. data/docs/RbmSuggestionResponse.md +4 -4
  36. data/docs/RecordingsApi.md +10 -50
  37. data/docs/StatisticsApi.md +1 -5
  38. data/docs/StatusCallback.md +2 -2
  39. data/docs/StatusCallbackMessage.md +3 -1
  40. data/docs/TfvSubmissionInfo.md +2 -2
  41. data/docs/TollFreeVerificationApi.md +12 -48
  42. data/docs/TranscriptionsApi.md +3 -15
  43. data/docs/TransferDisconnectCallback.md +7 -1
  44. data/docs/VerificationRequest.md +2 -2
  45. data/docs/VerificationUpdateRequest.md +3 -3
  46. data/generate.sh +9 -0
  47. data/lib/bandwidth-sdk/api/calls_api.rb +5 -5
  48. data/lib/bandwidth-sdk/api/conferences_api.rb +9 -9
  49. data/lib/bandwidth-sdk/api/endpoints_api.rb +5 -5
  50. data/lib/bandwidth-sdk/api/media_api.rb +8 -8
  51. data/lib/bandwidth-sdk/api/messages_api.rb +2 -2
  52. data/lib/bandwidth-sdk/api/mfa_api.rb +3 -3
  53. data/lib/bandwidth-sdk/api/multi_channel_api.rb +1 -1
  54. data/lib/bandwidth-sdk/api/phone_number_lookup_api.rb +3 -3
  55. data/lib/bandwidth-sdk/api/recordings_api.rb +10 -10
  56. data/lib/bandwidth-sdk/api/statistics_api.rb +1 -1
  57. data/lib/bandwidth-sdk/api/toll_free_verification_api.rb +15 -15
  58. data/lib/bandwidth-sdk/api/transcriptions_api.rb +3 -3
  59. data/lib/bandwidth-sdk/api_client.rb +3 -1
  60. data/lib/bandwidth-sdk/configuration.rb +18 -19
  61. data/lib/bandwidth-sdk/models/callback.rb +1 -0
  62. data/lib/bandwidth-sdk/models/disconnect_callback.rb +27 -5
  63. data/lib/bandwidth-sdk/models/inbound_callback_message.rb +10 -1
  64. data/lib/bandwidth-sdk/models/initiate_callback.rb +1 -1
  65. data/lib/bandwidth-sdk/models/list_message_item.rb +1 -0
  66. data/lib/bandwidth-sdk/models/multi_channel_action_calendar_event.rb +1 -1
  67. data/lib/bandwidth-sdk/models/rbm_action_base.rb +1 -1
  68. data/lib/bandwidth-sdk/models/rbm_action_dial.rb +1 -1
  69. data/lib/bandwidth-sdk/models/rbm_action_open_url.rb +1 -1
  70. data/lib/bandwidth-sdk/models/rbm_action_view_location.rb +1 -1
  71. data/lib/bandwidth-sdk/models/rbm_session.rb +208 -0
  72. data/lib/bandwidth-sdk/models/rbm_suggestion_response.rb +2 -2
  73. data/lib/bandwidth-sdk/models/status_callback_message.rb +13 -4
  74. data/lib/bandwidth-sdk/models/status_callback_type_enum.rb +2 -1
  75. data/lib/bandwidth-sdk/models/tfv_submission_info.rb +2 -2
  76. data/lib/bandwidth-sdk/models/transfer_disconnect_callback.rb +37 -5
  77. data/lib/bandwidth-sdk/models/verification_request.rb +2 -2
  78. data/lib/bandwidth-sdk/models/verification_update_request.rb +19 -2
  79. data/lib/bandwidth-sdk/version.rb +1 -1
  80. data/lib/bandwidth-sdk.rb +3 -2
  81. data/spec/smoke/calls_api_spec.rb +46 -46
  82. data/spec/smoke/conferences_api_spec.rb +1 -1
  83. data/spec/smoke/endpoints_api_spec.rb +2 -31
  84. data/spec/smoke/media_api_spec.rb +2 -0
  85. data/spec/smoke/messages_api_spec.rb +2 -24
  86. data/spec/smoke/mfa_api_spec.rb +4 -27
  87. data/spec/smoke/multi_channel_api_spec.rb +4 -2
  88. data/spec/smoke/phone_number_lookup_api_spec.rb +2 -0
  89. data/spec/smoke/recordings_api_spec.rb +1 -1
  90. data/spec/smoke/smoke_helper.rb +41 -0
  91. data/spec/smoke/statistics_api_spec.rb +2 -37
  92. data/spec/smoke/toll_free_verification_api_spec.rb +2 -0
  93. data/spec/smoke/transcriptions_api_spec.rb +1 -1
  94. data/spec/spec_helper.rb +0 -48
  95. data/spec/unit/api/calls_api_spec.rb +3 -1
  96. data/spec/unit/api/conferences_api_spec.rb +2 -0
  97. data/spec/unit/api/endpoints_api_spec.rb +2 -0
  98. data/spec/unit/api/media_api_spec.rb +2 -0
  99. data/spec/unit/api/messages_api_spec.rb +2 -0
  100. data/spec/unit/api/mfa_api_spec.rb +2 -0
  101. data/spec/unit/api/multi_channel_api_spec.rb +2 -0
  102. data/spec/unit/api/phone_number_lookup_api_spec.rb +2 -0
  103. data/spec/unit/api/recordings_api_spec.rb +2 -0
  104. data/spec/unit/api/statistics_api_spec.rb +2 -0
  105. data/spec/unit/api/toll_free_verification_api_spec.rb +2 -0
  106. data/spec/unit/api/transcriptions_api_spec.rb +2 -0
  107. data/spec/unit/client/api_client_spec.rb +70 -206
  108. data/spec/unit/client/configuration_spec.rb +22 -17
  109. data/spec/unit/constants.rb +6 -0
  110. data/spec/unit/models/callback_spec.rb +1 -0
  111. data/spec/unit/models/disconnect_callback_spec.rb +10 -2
  112. data/spec/unit/models/inbound_callback_message_spec.rb +20 -5
  113. data/spec/unit/models/list_message_item_spec.rb +1 -0
  114. data/spec/unit/models/rbm_session_spec.rb +95 -0
  115. data/spec/unit/models/status_callback_message_spec.rb +20 -5
  116. data/spec/unit/models/status_callback_type_enum_spec.rb +7 -1
  117. data/spec/unit/models/tfv_submission_wrapper_spec.rb +2 -1
  118. data/spec/unit/models/transfer_disconnect_callback_spec.rb +16 -4
  119. data/spec/unit/models/verification_update_request_spec.rb +4 -2
  120. metadata +10 -1
@@ -0,0 +1,208 @@
1
+ =begin
2
+ #Bandwidth
3
+
4
+ #Bandwidth's Communication APIs
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: letstalk@bandwidth.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.24.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Bandwidth
17
+ # RCS interactive session information for the message. An interactive session is a 24-hour window covering all Rich and Rich Media messages exchanged between an RCS agent and a specific end user mobile number. It is triggered when at least 4 messages are exchanged within 24 hours, at least 2 of them mobile-originated and at least 1 mobile-terminated. Only present on `message-delivered`, `message-received` and `session-started` callbacks for RBM messages of US agents with the Conversational billing category. Omitted for all other messages.
18
+ class RbmSession < ApiModelBase
19
+ # Whether the message can start an interactive session. `false` if the message is already part of an active session, or if the agent is not eligible for interactive session billing.
20
+ attr_accessor :can_initiate
21
+
22
+ # The unique identifier of the interactive session the message is part of. This is not a message ID. Omitted if the message is not part of a session.
23
+ attr_accessor :id
24
+
25
+ # The type of the interactive session. Only present on `session-started` callbacks.
26
+ attr_accessor :type
27
+
28
+ # The time the 24-hour session window opened. Only present on `session-started` callbacks.
29
+ attr_accessor :start_time
30
+
31
+ # The time the 24-hour session window closes. Only present on `session-started` callbacks.
32
+ attr_accessor :end_time
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'can_initiate' => :'canInitiate',
38
+ :'id' => :'id',
39
+ :'type' => :'type',
40
+ :'start_time' => :'startTime',
41
+ :'end_time' => :'endTime'
42
+ }
43
+ end
44
+
45
+ # Returns attribute mapping this model knows about
46
+ def self.acceptable_attribute_map
47
+ attribute_map
48
+ end
49
+
50
+ # Returns all the JSON keys this model knows about
51
+ def self.acceptable_attributes
52
+ acceptable_attribute_map.values
53
+ end
54
+
55
+ # Attribute type mapping.
56
+ def self.openapi_types
57
+ {
58
+ :'can_initiate' => :'Boolean',
59
+ :'id' => :'String',
60
+ :'type' => :'String',
61
+ :'start_time' => :'Time',
62
+ :'end_time' => :'Time'
63
+ }
64
+ end
65
+
66
+ # List of attributes with nullable: true
67
+ def self.openapi_nullable
68
+ Set.new([
69
+ :'id',
70
+ :'type',
71
+ :'start_time',
72
+ :'end_time'
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::RbmSession` initialize method'
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ acceptable_attribute_map = self.class.acceptable_attribute_map
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!acceptable_attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::RbmSession`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'can_initiate')
93
+ self.can_initiate = attributes[:'can_initiate']
94
+ else
95
+ self.can_initiate = nil
96
+ end
97
+
98
+ if attributes.key?(:'id')
99
+ self.id = attributes[:'id']
100
+ end
101
+
102
+ if attributes.key?(:'type')
103
+ self.type = attributes[:'type']
104
+ end
105
+
106
+ if attributes.key?(:'start_time')
107
+ self.start_time = attributes[:'start_time']
108
+ end
109
+
110
+ if attributes.key?(:'end_time')
111
+ self.end_time = attributes[:'end_time']
112
+ end
113
+ end
114
+
115
+ # Show invalid properties with the reasons. Usually used together with valid?
116
+ # @return Array for valid properties with the reasons
117
+ def list_invalid_properties
118
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
119
+ invalid_properties = Array.new
120
+ if @can_initiate.nil?
121
+ invalid_properties.push('invalid value for "can_initiate", can_initiate cannot be nil.')
122
+ end
123
+
124
+ invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+ warn '[DEPRECATED] the `valid?` method is obsolete'
131
+ return false if @can_initiate.nil?
132
+ true
133
+ end
134
+
135
+ # Custom attribute writer method with validation
136
+ # @param [Object] can_initiate Value to be assigned
137
+ def can_initiate=(can_initiate)
138
+ if can_initiate.nil?
139
+ fail ArgumentError, 'can_initiate cannot be nil'
140
+ end
141
+
142
+ @can_initiate = can_initiate
143
+ end
144
+
145
+ # Checks equality by comparing each attribute.
146
+ # @param [Object] Object to be compared
147
+ def ==(o)
148
+ return true if self.equal?(o)
149
+ self.class == o.class &&
150
+ can_initiate == o.can_initiate &&
151
+ id == o.id &&
152
+ type == o.type &&
153
+ start_time == o.start_time &&
154
+ end_time == o.end_time
155
+ end
156
+
157
+ # @see the `==` method
158
+ # @param [Object] Object to be compared
159
+ def eql?(o)
160
+ self == o
161
+ end
162
+
163
+ # Calculates hash code according to all attributes.
164
+ # @return [Integer] Hash code
165
+ def hash
166
+ [can_initiate, id, type, start_time, end_time].hash
167
+ end
168
+
169
+ # Builds the object from hash
170
+ # @param [Hash] attributes Model attributes in the form of hash
171
+ # @return [Object] Returns the model itself
172
+ def self.build_from_hash(attributes)
173
+ return nil unless attributes.is_a?(Hash)
174
+ attributes = attributes.transform_keys(&:to_sym)
175
+ transformed_hash = {}
176
+ openapi_types.each_pair do |key, type|
177
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
178
+ transformed_hash["#{key}"] = nil
179
+ elsif type =~ /\AArray<(.*)>/i
180
+ # check to ensure the input is an array given that the attribute
181
+ # is documented as an array but the input is not
182
+ if attributes[attribute_map[key]].is_a?(Array)
183
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
184
+ end
185
+ elsif !attributes[attribute_map[key]].nil?
186
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
187
+ end
188
+ end
189
+ new(transformed_hash)
190
+ end
191
+
192
+ # Returns the object in the form of hash
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_hash
195
+ hash = {}
196
+ self.class.attribute_map.each_pair do |attr, param|
197
+ value = self.send(attr)
198
+ if value.nil?
199
+ is_nullable = self.class.openapi_nullable.include?(attr)
200
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
201
+ end
202
+
203
+ hash[param] = _to_hash(value)
204
+ end
205
+ hash
206
+ end
207
+ end
208
+ end
@@ -15,10 +15,10 @@ require 'time'
15
15
 
16
16
  module Bandwidth
17
17
  class RbmSuggestionResponse < ApiModelBase
18
- # The text associated with the suggestion response.
18
+ # The text of the suggestion the user tapped.
19
19
  attr_accessor :text
20
20
 
21
- # Base64 payload the customer receives when the reply is clicked.
21
+ # Payload the customer receives when the reply is clicked.
22
22
  attr_accessor :postback_data
23
23
 
24
24
  # Corresponding parent message ID (MT).
@@ -50,6 +50,8 @@ module Bandwidth
50
50
 
51
51
  attr_accessor :channel
52
52
 
53
+ attr_accessor :session
54
+
53
55
  class EnumAttributeValidator
54
56
  attr_reader :datatype
55
57
  attr_reader :allowable_values
@@ -87,7 +89,8 @@ module Bandwidth
87
89
  :'tag' => :'tag',
88
90
  :'media' => :'media',
89
91
  :'priority' => :'priority',
90
- :'channel' => :'channel'
92
+ :'channel' => :'channel',
93
+ :'session' => :'session'
91
94
  }
92
95
  end
93
96
 
@@ -116,7 +119,8 @@ module Bandwidth
116
119
  :'tag' => :'String',
117
120
  :'media' => :'Array<String>',
118
121
  :'priority' => :'PriorityEnum',
119
- :'channel' => :'MultiChannelMessageChannelEnum'
122
+ :'channel' => :'MultiChannelMessageChannelEnum',
123
+ :'session' => :'RbmSession'
120
124
  }
121
125
  end
122
126
 
@@ -213,6 +217,10 @@ module Bandwidth
213
217
  if attributes.key?(:'channel')
214
218
  self.channel = attributes[:'channel']
215
219
  end
220
+
221
+ if attributes.key?(:'session')
222
+ self.session = attributes[:'session']
223
+ end
216
224
  end
217
225
 
218
226
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -367,7 +375,8 @@ module Bandwidth
367
375
  tag == o.tag &&
368
376
  media == o.media &&
369
377
  priority == o.priority &&
370
- channel == o.channel
378
+ channel == o.channel &&
379
+ session == o.session
371
380
  end
372
381
 
373
382
  # @see the `==` method
@@ -379,7 +388,7 @@ module Bandwidth
379
388
  # Calculates hash code according to all attributes.
380
389
  # @return [Integer] Hash code
381
390
  def hash
382
- [id, owner, application_id, time, segment_count, direction, to, from, text, tag, media, priority, channel].hash
391
+ [id, owner, application_id, time, segment_count, direction, to, from, text, tag, media, priority, channel, session].hash
383
392
  end
384
393
 
385
394
  # Builds the object from hash
@@ -20,9 +20,10 @@ module Bandwidth
20
20
  MESSAGE_DELIVERED = 'message-delivered'.freeze
21
21
  MESSAGE_FAILED = 'message-failed'.freeze
22
22
  MESSAGE_READ = 'message-read'.freeze
23
+ SESSION_STARTED = 'session-started'.freeze
23
24
 
24
25
  def self.all_vars
25
- @all_vars ||= [MESSAGE_SENDING, MESSAGE_SENT, MESSAGE_DELIVERED, MESSAGE_FAILED, MESSAGE_READ].freeze
26
+ @all_vars ||= [MESSAGE_SENDING, MESSAGE_SENT, MESSAGE_DELIVERED, MESSAGE_FAILED, MESSAGE_READ, SESSION_STARTED].freeze
26
27
  end
27
28
 
28
29
  # Builds the enum from string
@@ -48,12 +48,12 @@ module Bandwidth
48
48
  # The company 'Doing Business As'.
49
49
  attr_accessor :business_dba
50
50
 
51
- # Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.**
51
+ # Government-issued business identifying number. **As of October 19th, 2026 this field is required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.**
52
52
  attr_accessor :business_registration_number
53
53
 
54
54
  attr_accessor :business_registration_type
55
55
 
56
- # The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code |
56
+ # The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **As of October 19th, 2026 this field is required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code |
57
57
  attr_accessor :business_registration_issuing_country
58
58
 
59
59
  attr_accessor :business_entity_type
@@ -75,6 +75,15 @@ module Bandwidth
75
75
  # Bandwidth's internal id that references the error event.
76
76
  attr_accessor :error_id
77
77
 
78
+ # (optional) The SIP status code of the final response that rejected an outbound call's (or transferred leg's) INVITE (e.g. 486 for busy, 603 for decline). Present only when the call was rejected with a SIP response.
79
+ attr_accessor :sip_response_code
80
+
81
+ # (optional) The full SIP status line, exactly as received, of the final response that rejected an outbound call's INVITE. The reason phrase can help distinguish outcomes that share a status code, such as `603 Network Blocked` and `603 Decline`. Present only when an outbound call was rejected with a SIP response.
82
+ attr_accessor :sip_status_line
83
+
84
+ # (optional) Map of SIP headers, with lowercase keys (SIP headers are case-insensitive). On the Initiate callback, contains the customer-supplied X-* headers from the original INVITE; present only for inbound SIP URI calls with custom headers. On the Disconnect and Transfer Disconnect callbacks, contains a single `reason` key holding the raw, unmodified `Reason` header value from the final SIP response that rejected an outbound call (or transferred leg); present only when that response included a `Reason` header (for example, `v=analytics1` call-analytics block information from a terminating carrier). If the response carries more than one `Reason` header, all values are returned in the order received, separated by `, `. Note - on the Initiate callback, keys preserve the original SIP header name in lowercase rather than Bandwidth's usual camelCase JSON convention, since these are passthrough values from the caller's SIP INVITE, not Bandwidth-defined fields. If the same header name is sent more than once in the INVITE, only the last value is kept. The example shown is for the Initiate callback; on the Disconnect and Transfer Disconnect callbacks the only key is `reason`.
85
+ attr_accessor :sip_headers
86
+
78
87
  class EnumAttributeValidator
79
88
  attr_reader :datatype
80
89
  attr_reader :allowable_values
@@ -119,7 +128,10 @@ module Bandwidth
119
128
  :'transfer_to' => :'transferTo',
120
129
  :'cause' => :'cause',
121
130
  :'error_message' => :'errorMessage',
122
- :'error_id' => :'errorId'
131
+ :'error_id' => :'errorId',
132
+ :'sip_response_code' => :'sipResponseCode',
133
+ :'sip_status_line' => :'sipStatusLine',
134
+ :'sip_headers' => :'sipHeaders'
123
135
  }
124
136
  end
125
137
 
@@ -155,7 +167,10 @@ module Bandwidth
155
167
  :'transfer_to' => :'String',
156
168
  :'cause' => :'String',
157
169
  :'error_message' => :'String',
158
- :'error_id' => :'String'
170
+ :'error_id' => :'String',
171
+ :'sip_response_code' => :'Integer',
172
+ :'sip_status_line' => :'String',
173
+ :'sip_headers' => :'Hash<String, String>'
159
174
  }
160
175
  end
161
176
 
@@ -166,7 +181,7 @@ module Bandwidth
166
181
  :'answer_time',
167
182
  :'tag',
168
183
  :'error_message',
169
- :'error_id'
184
+ :'error_id',
170
185
  ])
171
186
  end
172
187
 
@@ -265,6 +280,20 @@ module Bandwidth
265
280
  if attributes.key?(:'error_id')
266
281
  self.error_id = attributes[:'error_id']
267
282
  end
283
+
284
+ if attributes.key?(:'sip_response_code')
285
+ self.sip_response_code = attributes[:'sip_response_code']
286
+ end
287
+
288
+ if attributes.key?(:'sip_status_line')
289
+ self.sip_status_line = attributes[:'sip_status_line']
290
+ end
291
+
292
+ if attributes.key?(:'sip_headers')
293
+ if (value = attributes[:'sip_headers']).is_a?(Hash)
294
+ self.sip_headers = value
295
+ end
296
+ end
268
297
  end
269
298
 
270
299
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -306,7 +335,10 @@ module Bandwidth
306
335
  transfer_to == o.transfer_to &&
307
336
  cause == o.cause &&
308
337
  error_message == o.error_message &&
309
- error_id == o.error_id
338
+ error_id == o.error_id &&
339
+ sip_response_code == o.sip_response_code &&
340
+ sip_status_line == o.sip_status_line &&
341
+ sip_headers == o.sip_headers
310
342
  end
311
343
 
312
344
  # @see the `==` method
@@ -318,7 +350,7 @@ module Bandwidth
318
350
  # Calculates hash code according to all attributes.
319
351
  # @return [Integer] Hash code
320
352
  def hash
321
- [event_type, event_time, account_id, application_id, from, to, direction, call_id, call_url, parent_call_id, enqueued_time, start_time, answer_time, end_time, tag, transfer_caller_id, transfer_to, cause, error_message, error_id].hash
353
+ [event_type, event_time, account_id, application_id, from, to, direction, call_id, call_url, parent_call_id, enqueued_time, start_time, answer_time, end_time, tag, transfer_caller_id, transfer_to, cause, error_message, error_id, sip_response_code, sip_status_line, sip_headers].hash
322
354
  end
323
355
 
324
356
  # Builds the object from hash
@@ -50,12 +50,12 @@ module Bandwidth
50
50
  # The company 'Doing Business As'.
51
51
  attr_accessor :business_dba
52
52
 
53
- # Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.**
53
+ # Government-issued business identifying number. **As of October 19th, 2026 this field is required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.**
54
54
  attr_accessor :business_registration_number
55
55
 
56
56
  attr_accessor :business_registration_type
57
57
 
58
- # The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code |
58
+ # The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **As of October 19th, 2026 this field is required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code |
59
59
  attr_accessor :business_registration_issuing_country
60
60
 
61
61
  attr_accessor :business_entity_type
@@ -48,14 +48,14 @@ module Bandwidth
48
48
  # The company 'Doing Business As'.
49
49
  attr_accessor :business_dba
50
50
 
51
- # Government-issued business identifying number. **Note: As of October 19th, 2026 this field will be required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.**
51
+ # Government-issued business identifying number. **As of October 19th, 2026 this field is required when `businessEntityType` is _not_ `SOLE_PROPRIETOR`. If this field is provided, `businessRegistrationType` and `businessRegistrationIssuingCountry` are also required.**
52
52
  attr_accessor :business_registration_number
53
53
 
54
54
  attr_accessor :business_registration_type
55
55
 
56
56
  attr_accessor :business_entity_type
57
57
 
58
- # The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **Note: As of October 19th, 2026 this field will be required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code |
58
+ # The country issuing the business registration in ISO-3166-1 alpha-3 format. Alpha-2 format is accepted by the API, but alpha-3 is highly encouraged. **As of October 19th, 2026 this field is required when `businessRegistrationNumber` is provided.** | Registration Type | Supported Countries | |----------------------|------------------------------------| | EIN | USA | | CBN | CAN | | NEQ | CAN | | PROVINCIAL_NUMBER | CAN | | CRN | GBR, HKG | | VAT | GBR, IRL, BRA, NLD | | ACN | AUS | | ABN | AUS | | BRN | HKG | | SIREN | FRA | | SIRET | FRA | | NZBN | NZL | | UST_IDNR | DEU | | CIF | ESP | | NIF | ESP | | CNPJ | BRA | | UID | CHE | | OTHER | Must Provide Country Code |
59
59
  attr_accessor :business_registration_issuing_country
60
60
 
61
61
  # A message that gets sent to users requesting help.
@@ -250,6 +250,8 @@ module Bandwidth
250
250
 
251
251
  if attributes.key?(:'business_entity_type')
252
252
  self.business_entity_type = attributes[:'business_entity_type']
253
+ else
254
+ self.business_entity_type = nil
253
255
  end
254
256
 
255
257
  if attributes.key?(:'business_registration_issuing_country')
@@ -366,6 +368,10 @@ module Bandwidth
366
368
  invalid_properties.push('invalid value for "business_registration_number", the character length must be smaller than or equal to 500.')
367
369
  end
368
370
 
371
+ if @business_entity_type.nil?
372
+ invalid_properties.push('invalid value for "business_entity_type", business_entity_type cannot be nil.')
373
+ end
374
+
369
375
  if !@help_message_response.nil? && @help_message_response.to_s.length > 500
370
376
  invalid_properties.push('invalid value for "help_message_response", the character length must be smaller than or equal to 500.')
371
377
  end
@@ -408,6 +414,7 @@ module Bandwidth
408
414
  return false if !@terms_and_conditions_url.nil? && @terms_and_conditions_url.to_s.length > 500
409
415
  return false if !@business_dba.nil? && @business_dba.to_s.length > 500
410
416
  return false if !@business_registration_number.nil? && @business_registration_number.to_s.length > 500
417
+ return false if @business_entity_type.nil?
411
418
  return false if !@help_message_response.nil? && @help_message_response.to_s.length > 500
412
419
  return false if !@cv_token.nil? && @cv_token.to_s.length > 500
413
420
  return false if !@cv_token.nil? && @cv_token.to_s.length < 0
@@ -596,6 +603,16 @@ module Bandwidth
596
603
  @business_registration_number = business_registration_number
597
604
  end
598
605
 
606
+ # Custom attribute writer method with validation
607
+ # @param [Object] business_entity_type Value to be assigned
608
+ def business_entity_type=(business_entity_type)
609
+ if business_entity_type.nil?
610
+ fail ArgumentError, 'business_entity_type cannot be nil'
611
+ end
612
+
613
+ @business_entity_type = business_entity_type
614
+ end
615
+
599
616
  # Custom attribute writer method with validation
600
617
  # @param [Object] help_message_response Value to be assigned
601
618
  def help_message_response=(help_message_response)
@@ -11,5 +11,5 @@ Generator version: 7.24.0
11
11
  =end
12
12
 
13
13
  module Bandwidth
14
- VERSION = '18.3.0'
14
+ VERSION = '19.0.0'
15
15
  end
data/lib/bandwidth-sdk.rb CHANGED
@@ -164,6 +164,7 @@ require 'bandwidth-sdk/models/rbm_message_content_rich_card'
164
164
  require 'bandwidth-sdk/models/rbm_message_content_text'
165
165
  require 'bandwidth-sdk/models/rbm_message_media'
166
166
  require 'bandwidth-sdk/models/rbm_open_url_enum'
167
+ require 'bandwidth-sdk/models/rbm_session'
167
168
  require 'bandwidth-sdk/models/rbm_standalone_card'
168
169
  require 'bandwidth-sdk/models/rbm_suggestion_response'
169
170
  require 'bandwidth-sdk/models/rbm_web_view_enum'
@@ -276,8 +277,8 @@ module Bandwidth
276
277
  class << self
277
278
  # Customize default settings for the SDK using block.
278
279
  # Bandwidth.configure do |config|
279
- # config.username = "xxx"
280
- # config.password = "xxx"
280
+ # config.client_id = "xxx"
281
+ # config.client_secret = "xxx"
281
282
  # end
282
283
  # If no block given, return the default Configuration object.
283
284
  def configure
@@ -1,4 +1,4 @@
1
- require_relative '../call_utils'
1
+ require_relative 'smoke_helper'
2
2
 
3
3
  # Integration Tests for Bandwidth::CallsApi
4
4
  describe 'CallsApi Integration Tests' do
@@ -83,7 +83,7 @@ describe 'CallsApi Integration Tests' do
83
83
  # Get Calls
84
84
  describe '#list_calls' do
85
85
  it 'gets a list of calls' do
86
- data, status_code = @calls_api_instance.list_calls_with_http_info(BW_ACCOUNT_ID)
86
+ data, status_code = @calls_api_instance.list_calls_with_http_info(BW_ACCOUNT_ID, { to: USER_NUMBER, from: BW_NUMBER })
87
87
 
88
88
  expect(status_code).to eq(200)
89
89
  expect(data).to be_instance_of(Array)
@@ -94,58 +94,58 @@ describe 'CallsApi Integration Tests' do
94
94
  end
95
95
 
96
96
  # Get Call State Information
97
- # describe 'get_call_state' do
98
- # it 'gets the call state' do
99
- # sleep(40) # wait 40s for voice API to update call status
100
- # data, status_code = @calls_api_instance.get_call_state_with_http_info(BW_ACCOUNT_ID, $call_info_id)
101
-
102
- # expect(status_code).to eq(200)
103
- # expect(data).to be_instance_of(Bandwidth::CallState)
104
- # expect(data.call_id).to eq($call_info_id)
105
- # expect(data.account_id).to eq(BW_ACCOUNT_ID)
106
- # expect(data.application_id).to eq(BW_VOICE_APPLICATION_ID)
107
- # expect(data.start_time).to be_instance_of(Time).or be_nil
108
- # expect(data.last_update).to be_instance_of(Time)
109
- # expect(data.state).to be_instance_of(String)
110
- # expect(data.direction).to eq(direction)
111
- # end
112
- # end
97
+ describe 'get_call_state' do
98
+ it 'gets the call state' do
99
+ sleep(40) # wait 40s for voice API to update call status
100
+ data, status_code = @calls_api_instance.get_call_state_with_http_info(BW_ACCOUNT_ID, $call_info_id)
101
+
102
+ expect(status_code).to eq(200)
103
+ expect(data).to be_instance_of(Bandwidth::CallState)
104
+ expect(data.call_id).to eq($call_info_id)
105
+ expect(data.account_id).to eq(BW_ACCOUNT_ID)
106
+ expect(data.application_id).to eq(BW_VOICE_APPLICATION_ID)
107
+ expect(data.start_time).to be_instance_of(Time).or be_nil
108
+ expect(data.last_update).to be_instance_of(Time)
109
+ expect(data.state).to be_instance_of(String)
110
+ expect(data.direction).to eq(direction)
111
+ end
112
+ end
113
113
 
114
114
  # Update Call
115
- # describe 'update_call' do
116
- # it 'creates and updates a call' do
117
- # update_call_body = Bandwidth::UpdateCall.new(
118
- # state: Bandwidth::CallStateEnum::ACTIVE,
119
- # redirect_url: MANTECA_BASE_URL + '/bxml/pause'
120
- # )
115
+ describe 'update_call' do
116
+ it 'creates and updates a call' do
117
+ update_call_body = Bandwidth::UpdateCall.new(
118
+ state: Bandwidth::CallStateEnum::ACTIVE,
119
+ redirect_url: MANTECA_BASE_URL + '/bxml/pause'
120
+ )
121
121
 
122
- # update_call_id = create_manteca_call(@calls_api_instance)
123
- # sleep(SLEEP_TIME_S)
122
+ update_call_id = create_manteca_call(@calls_api_instance)
123
+ sleep(SLEEP_TIME_S)
124
124
 
125
- # _update_data, update_status_code = @calls_api_instance.update_call_with_http_info(BW_ACCOUNT_ID, update_call_id, update_call_body)
126
- # expect(update_status_code).to eq(200)
127
- # sleep(SLEEP_TIME_S)
125
+ _update_data, update_status_code = @calls_api_instance.update_call_with_http_info(BW_ACCOUNT_ID, update_call_id, update_call_body)
126
+ expect(update_status_code).to eq(200)
127
+ sleep(SLEEP_TIME_S)
128
128
 
129
- # _complete_data, complete_status_code = @calls_api_instance.update_call_with_http_info(BW_ACCOUNT_ID, update_call_id, $complete_call_body)
130
- # expect(complete_status_code).to eq(200)
131
- # end
132
- # end
129
+ _complete_data, complete_status_code = @calls_api_instance.update_call_with_http_info(BW_ACCOUNT_ID, update_call_id, $complete_call_body)
130
+ expect(complete_status_code).to eq(200)
131
+ end
132
+ end
133
133
 
134
134
  # Update Call BXML
135
- # describe 'update_call_bxml' do
136
- # it 'updates a call using bxml' do
137
- # update_call_id = create_manteca_call(@calls_api_instance)
138
- # sleep(SLEEP_TIME_S)
139
-
140
- # update_bxml = '<?xml version="1.0" encoding="UTF-8"?><Bxml><SpeakSentence locale="en_US" gender="female" voice="susan">This is a test bxml response</SpeakSentence><Pause duration="3"/></Bxml>'
141
- # _update_data, update_status_code = @calls_api_instance.update_call_bxml_with_http_info(BW_ACCOUNT_ID, update_call_id, update_bxml)
142
- # expect(update_status_code).to eq(204)
143
- # sleep(SLEEP_TIME_S)
135
+ describe 'update_call_bxml' do
136
+ it 'updates a call using bxml' do
137
+ update_call_id = create_manteca_call(@calls_api_instance)
138
+ sleep(SLEEP_TIME_S)
139
+
140
+ update_bxml = '<?xml version="1.0" encoding="UTF-8"?><Bxml><SpeakSentence locale="en_US" gender="female" voice="susan">This is a test bxml response</SpeakSentence><Pause duration="3"/></Bxml>'
141
+ _update_data, update_status_code = @calls_api_instance.update_call_bxml_with_http_info(BW_ACCOUNT_ID, update_call_id, update_bxml)
142
+ expect(update_status_code).to eq(204)
143
+ sleep(SLEEP_TIME_S)
144
144
 
145
- # _complete_data, complete_status_code = @calls_api_instance.update_call_with_http_info(BW_ACCOUNT_ID, update_call_id, $complete_call_body)
146
- # expect(complete_status_code).to eq(200)
147
- # end
148
- # end
145
+ _complete_data, complete_status_code = @calls_api_instance.update_call_with_http_info(BW_ACCOUNT_ID, update_call_id, $complete_call_body)
146
+ expect(complete_status_code).to eq(200)
147
+ end
148
+ end
149
149
 
150
150
  # HTTP 4XX Errors
151
151
  describe 'http error' do
@@ -1,4 +1,4 @@
1
- require_relative '../call_utils'
1
+ require_relative 'smoke_helper'
2
2
 
3
3
  # Integration Tests for Bandwidth::ConferencesApi
4
4
  describe 'ConferencesApi Integration Tests' do