-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from Bandwidth/release/2021-01-27-20-39-24
New deploy
- Loading branch information
Showing
15 changed files
with
600 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
bandwidth | ||
This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ). | ||
""" | ||
|
||
|
||
class BandwidthMessageItem(object): | ||
|
||
"""Implementation of the 'BandwidthMessageItem' model. | ||
TODO: type model description here. | ||
Attributes: | ||
message_id (string): The message id | ||
account_id (string): The account id of the message | ||
source_tn (string): The source phone number of the message | ||
destination_tn (string): The recipient phone number of the message | ||
message_status (string): The status of the message | ||
message_direction (string): The direction of the message relative to | ||
Bandwidth. INBOUND or OUTBOUND | ||
message_type (string): The type of message. sms or mms | ||
segment_count (int): The number of segments the message was sent as | ||
error_code (int): The numeric error code of the message | ||
receive_time (string): The ISO 8601 datetime of the message | ||
carrier_name (string): The name of the carrier. Not currently | ||
supported for MMS, coming soon | ||
""" | ||
|
||
# Create a mapping from Model property names to API property names | ||
_names = { | ||
"message_id": 'messageId', | ||
"account_id": 'accountId', | ||
"source_tn": 'sourceTn', | ||
"destination_tn": 'destinationTn', | ||
"message_status": 'messageStatus', | ||
"message_direction": 'messageDirection', | ||
"message_type": 'messageType', | ||
"segment_count": 'segmentCount', | ||
"error_code": 'errorCode', | ||
"receive_time": 'receiveTime', | ||
"carrier_name": 'carrierName' | ||
} | ||
|
||
def __init__(self, | ||
message_id=None, | ||
account_id=None, | ||
source_tn=None, | ||
destination_tn=None, | ||
message_status=None, | ||
message_direction=None, | ||
message_type=None, | ||
segment_count=None, | ||
error_code=None, | ||
receive_time=None, | ||
carrier_name=None): | ||
"""Constructor for the BandwidthMessageItem class""" | ||
|
||
# Initialize members of the class | ||
self.message_id = message_id | ||
self.account_id = account_id | ||
self.source_tn = source_tn | ||
self.destination_tn = destination_tn | ||
self.message_status = message_status | ||
self.message_direction = message_direction | ||
self.message_type = message_type | ||
self.segment_count = segment_count | ||
self.error_code = error_code | ||
self.receive_time = receive_time | ||
self.carrier_name = carrier_name | ||
|
||
@classmethod | ||
def from_dictionary(cls, | ||
dictionary): | ||
"""Creates an instance of this model from a dictionary | ||
Args: | ||
dictionary (dictionary): A dictionary representation of the object | ||
as obtained from the deserialization of the server's response. The | ||
keys MUST match property names in the API description. | ||
Returns: | ||
object: An instance of this structure class. | ||
""" | ||
if dictionary is None: | ||
return None | ||
|
||
# Extract variables from the dictionary | ||
message_id = dictionary.get('messageId') | ||
account_id = dictionary.get('accountId') | ||
source_tn = dictionary.get('sourceTn') | ||
destination_tn = dictionary.get('destinationTn') | ||
message_status = dictionary.get('messageStatus') | ||
message_direction = dictionary.get('messageDirection') | ||
message_type = dictionary.get('messageType') | ||
segment_count = dictionary.get('segmentCount') | ||
error_code = dictionary.get('errorCode') | ||
receive_time = dictionary.get('receiveTime') | ||
carrier_name = dictionary.get('carrierName') | ||
|
||
# Return an object of this model | ||
return cls(message_id, | ||
account_id, | ||
source_tn, | ||
destination_tn, | ||
message_status, | ||
message_direction, | ||
message_type, | ||
segment_count, | ||
error_code, | ||
receive_time, | ||
carrier_name) |
Oops, something went wrong.