Skip to content

Commit 4285303

Browse files
Generate SDK with OpenAPI Generator Version (#172)
Co-authored-by: DX-Bandwidth <[email protected]>
1 parent d3e6962 commit 4285303

File tree

5 files changed

+29
-12
lines changed

5 files changed

+29
-12
lines changed

bandwidth.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2494,6 +2494,14 @@ components:
24942494
description: Optional error code, applicable only when type is `message-failed`.
24952495
nullable: true
24962496
example: 4405
2497+
carrierName:
2498+
type: string
2499+
description: >-
2500+
The name of the Authorized Message Provider (AMP) that handled this
2501+
message. In the US, this is the carrier that the message was sent
2502+
to.
2503+
nullable: true
2504+
example: AT&T
24972505
required:
24982506
- time
24992507
- type
@@ -5849,8 +5857,6 @@ components:
58495857
- VERIFIED
58505858
- UNVERIFIED
58515859
- PENDING
5852-
- PARTIALLY_VERIFIED
5853-
- INVALID_STATUS
58545860
example: VERIFIED
58555861
sharedSecretKey:
58565862
description: >-

docs/MessageCallback.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
| **description** | **String** | A detailed description of the event described by the callback. | |
1111
| **message** | [**MessageCallbackMessage**](MessageCallbackMessage.md) | | |
1212
| **error_code** | **Integer** | Optional error code, applicable only when type is &#x60;message-failed&#x60;. | [optional] |
13+
| **carrier_name** | **String** | The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to. | [optional] |
1314

1415
## Example
1516

@@ -22,7 +23,8 @@ instance = Bandwidth::MessageCallback.new(
2223
to: +15552223333,
2324
description: rejected-unallocated-from-number,
2425
message: null,
25-
error_code: 4405
26+
error_code: 4405,
27+
carrier_name: AT&amp;T
2628
)
2729
```
2830

docs/RbmActionBase.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require 'bandwidth-sdk'
1616
instance = Bandwidth::RbmActionBase.new(
1717
type: null,
1818
text: Hello world,
19-
post_back_data: [B@5c930fc3
19+
post_back_data: [B@204c5ddf
2020
)
2121
```
2222

lib/bandwidth-sdk/models/message_callback.rb

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ class MessageCallback
3030
# Optional error code, applicable only when type is `message-failed`.
3131
attr_accessor :error_code
3232

33+
# The name of the Authorized Message Provider (AMP) that handled this message. In the US, this is the carrier that the message was sent to.
34+
attr_accessor :carrier_name
35+
3336
class EnumAttributeValidator
3437
attr_reader :datatype
3538
attr_reader :allowable_values
@@ -60,7 +63,8 @@ def self.attribute_map
6063
:'to' => :'to',
6164
:'description' => :'description',
6265
:'message' => :'message',
63-
:'error_code' => :'errorCode'
66+
:'error_code' => :'errorCode',
67+
:'carrier_name' => :'carrierName'
6468
}
6569
end
6670

@@ -77,14 +81,16 @@ def self.openapi_types
7781
:'to' => :'String',
7882
:'description' => :'String',
7983
:'message' => :'MessageCallbackMessage',
80-
:'error_code' => :'Integer'
84+
:'error_code' => :'Integer',
85+
:'carrier_name' => :'String'
8186
}
8287
end
8388

8489
# List of attributes with nullable: true
8590
def self.openapi_nullable
8691
Set.new([
87-
:'error_code'
92+
:'error_code',
93+
:'carrier_name'
8894
])
8995
end
9096

@@ -136,6 +142,10 @@ def initialize(attributes = {})
136142
if attributes.key?(:'error_code')
137143
self.error_code = attributes[:'error_code']
138144
end
145+
146+
if attributes.key?(:'carrier_name')
147+
self.carrier_name = attributes[:'carrier_name']
148+
end
139149
end
140150

141151
# Show invalid properties with the reasons. Usually used together with valid?
@@ -188,7 +198,8 @@ def ==(o)
188198
to == o.to &&
189199
description == o.description &&
190200
message == o.message &&
191-
error_code == o.error_code
201+
error_code == o.error_code &&
202+
carrier_name == o.carrier_name
192203
end
193204

194205
# @see the `==` method
@@ -200,7 +211,7 @@ def eql?(o)
200211
# Calculates hash code according to all attributes.
201212
# @return [Integer] Hash code
202213
def hash
203-
[time, type, to, description, message, error_code].hash
214+
[time, type, to, description, message, error_code, carrier_name].hash
204215
end
205216

206217
# Builds the object from hash

lib/bandwidth-sdk/models/tfv_status_enum.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ class TfvStatusEnum
1818
VERIFIED = 'VERIFIED'.freeze
1919
UNVERIFIED = 'UNVERIFIED'.freeze
2020
PENDING = 'PENDING'.freeze
21-
PARTIALLY_VERIFIED = 'PARTIALLY_VERIFIED'.freeze
22-
INVALID_STATUS = 'INVALID_STATUS'.freeze
2321

2422
def self.all_vars
25-
@all_vars ||= [VERIFIED, UNVERIFIED, PENDING, PARTIALLY_VERIFIED, INVALID_STATUS].freeze
23+
@all_vars ||= [VERIFIED, UNVERIFIED, PENDING].freeze
2624
end
2725

2826
# Builds the enum from string

0 commit comments

Comments
 (0)