My copy of flowroute sdk.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
flowroute-sdk-v3-python/flowroutenumbersandmessaging/models/delivery_receipt.py

81 lines
2.7 KiB

# -*- coding: utf-8 -*-
"""
flowroutenumbersandmessaging.models.delivery_receipt
This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io )
"""
from flowroutenumbersandmessaging.api_helper import APIHelper
class DeliveryReceipt(object):
"""Implementation of the 'DeliveryReceipt' model.
TODO: type model description here.
Attributes:
level (int): TODO: type description here.
status (string): TODO: type description here.
status_code (int): TODO: type description here.
status_code_description (string): TODO: type description here.
timestamp (datetime): TODO: type description here.
"""
# Create a mapping from Model property names to API property names
_names = {
"level" : "level",
"status" : "status",
"status_code" : "status_code",
"status_code_description" : "status_code_description",
"timestamp" : "timestamp"
}
def __init__(self,
level=None,
status=None,
status_code=None,
status_code_description=None,
timestamp=None):
"""Constructor for the DeliveryReceipt class"""
# Initialize members of the class
self.level = level
self.status = status
self.status_code = status_code
self.status_code_description = status_code_description
self.timestamp = APIHelper.RFC3339DateTime(timestamp) if timestamp else None
@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
level = dictionary.get("level")
status = dictionary.get("status")
status_code = dictionary.get("status_code")
status_code_description = dictionary.get("status_code_description")
timestamp = APIHelper.RFC3339DateTime.from_value(dictionary.get("timestamp")).datetime if dictionary.get("timestamp") else None
# Return an object of this model
return cls(level,
status,
status_code,
status_code_description,
timestamp)