def get(self):
     """GET method handler."""
     return Response(json.dumps(
         VersionSchema().dump(dict(
             version=version,
             db_schema_version=db_schema_version
         )).data))
 def post(self):
     print("Are we in the send API Call")
     sender = '03337372337'
     network = 'ufone-smpp'
     message = "This is the test message to be send to the user"
     jasmin_send_response = Jasmin.send(sender, network, message)
     print(jasmin_send_response)
     return Response(
         json.dumps(VersionSchema().dump(
             dict(version=version,
                  db_schema_version=db_schema_version)).data))
    def post(self):
        print("Are we in the Send Batch Post call")

        messages_list = []
        messages = {
            'from': 'sender_name',
            'to': '03331234567',
            'content': 'Lorum Ipsum'
        }
        messages_list.append(messages.copy())

        jasmin_send_response = Jasmin.send_batch(messages_list,
                                                 network='ufone')
        print(jasmin_send_response)
        return Response(
            json.dumps(VersionSchema().dump(
                dict(version=version,
                     db_schema_version=db_schema_version)).data))