Giter VIP home page Giter VIP logo

textveloper's Introduction

Textveloper

Envío de mensajes de texto a tráves del servicio de mesajeria de Textveloper

Code Climate

Gem Version

Build Status

Gittip

Installation

Add this line to your application's Gemfile:

gem 'textveloper'

And then execute:

$ bundle

Or install it yourself as:

$ gem install textveloper

Uso

sms = Textveloper::Sdk.new(cuenta_token,subcuenta_token)

Enviar mensajes individuales

  sms.send_sms(numero,mensaje)
  sms.send_sms("04141234567","Hola Mundo")

Este metodo retorna un Hash object (de ser exitoso esta seria la respuesta)

 {:"04141234567" => {"transaccion"=>"exitosa", "mensaje_transaccion"=>"MENSAJE_ENVIADO"}}

Enviar mensajes "cadena" o masivos

único mensaje a multiples números celulares

  sms.mass_messages(arreglo_de_numeros, mensaje)
  telefonos = ["04121234567","04149876543","04164567890"]

  sms.mass_messages(telefonos, "Hola a todos") 

Retorna un hash con la respuesta asociada a cada número telefónico

  {
    :"04141234567" => {"transaccion"=>"exitosa", "mensaje_transaccion"=>"MENSAJE_ENVIADO"},
    :"04149876543" => {"transaccion"=>"exitosa", "mensaje_transaccion"=>"MENSAJE_ENVIADO"},
    :"04164567890" => {"transaccion"=>"exitosa", "mensaje_transaccion"=>"MENSAJE_ENVIADO"}
  }

Historial

Transferencias

Consulta de transferencia de puntos a subcuentas

  sms.transfer_history
  {
    "transaccion"=>"exitosa", 
    "historico"=>[{"codigo_transaccion"=>"13", "fecha"=>"2013-09-24 00:29:13", "cantidad"=>"50"}]
  }

Mensajes Enviados

Consulta de mensajes enviados por cuenta

  sms.account_history
  { 
    "transaccion"=>"exitosa", 
    "historico"=>
      [
        { "codigo_log"=>"100", 
          "telefono"=>"04141234567", 
          "estatus"=>"Enviado", 
          "mensaje"=>"Hola Mundo", 
          "fecha"=>"2013-09-23 23:20:07"
        }, 
        { "codigo_log"=>"101", 
          "telefono"=>"04129876543", 
          "estatus"=>"Enviado", 
          "mensaje"=>"Hola Marte", 
          "fecha"=>"2013-09-23 23:24:43"
         }
      ]
  }

Compras

Pendiente

Consulta de Puntos

Consulta de puntos por cuenta

  sms.account_balance
  {"transaccion"=>"exitosa", "puntos_utilizados"=>"54", "total_puntos"=>"100", "puntos_disponibles"=>"46"}

puntos_utilizados todos los puntos que fueron transferidos a las distintas subcuentas

total_puntos todos los puntos adquiridos

puntos_disponibles todos los puntos que aún no han sido utilizados

Consulta de Puntos por subcuenta

Las subcuentas deben ser limitadas y tener un numero finito de puntos(mensajes)

  sms.subaccount_balance 
  {"transaccion"=>"exitosa", "puntos_enviados"=>"2", "total_puntos"=>"50", "puntos_disponibles"=>"48"}

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

textveloper's People

Contributors

despinozac avatar gusga avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.