New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

omnichannel

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

omnichannel

  • 1.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

omnichannel

Omnichannel - the Ruby gem for the Omnichannel API

Installation

Build a gem

To build the Ruby code into a gem:

gem build omnichannel.gemspec

Then either install the gem locally:

gem install ./omnichannel-1.0.0.gem

(for development, run gem install --dev ./omnichannel-1.0.0.gem to install the development dependencies)

Finally add this to the Gemfile:

gem 'omnichannel', '~> 1.0.0'

Install from Git

gem 'omnichannel', :git => 'https://github.com/messente/messente-omnichannel-ruby.git'

Getting Started

Please follow the installation procedure and then run the following code:

require 'omnichannel'
# setup authorization
Omnichannel.configure do |config|
    # Configure HTTP basic authorization: basicAuth
    config.username = '<MESSENTE_API_USERNAME>'
    config.password = '<MESSENTE_API_PASSWORD>'
end

api_instance = Omnichannel::OmnimessageApi.new
omnimessage = Omnichannel::Omnimessage.new
omnimessage.to = '<phone number in e.164 format>'
omnimessage.messages = [
    Omnichannel::SMS.new(
        {
            :sender => "<sender name or phone number in e.164 format>",
            :text => "Hello SMS!"
        }
    ),
    Omnichannel::WhatsApp.new(
        {
            :sender => "<sender name or phone number in e.164 format>",
            :text => Omnichannel::WhatsAppText.new(
                {
                    :body => "Hello from WhatsApp!",
                    :preview_url => false
                }
            )
        }
    ),
    Omnichannel::Viber.new(
        {
            :sender => "<sender name or phone number in e.164 format>",
            :text => "Hello from Viber!"
        }
    )
]

begin
    result = api_instance.send_omnimessage(omnimessage)
rescue Omnichannel::ApiError => e
    puts "Exception when calling OmnimessageApi->send_omnimessage: #{e}"
    puts e.response_body
end

Documentation for API Endpoints

All URIs are relative to https://api.messente.com/v1

ClassMethodHTTP requestDescription
Omnichannel::DeliveryReportApiretrieve_delivery_reportGET /omnimessage/{omnimessage_id}/statusRetrieves the delivery report for the Omnimessage
Omnichannel::OmnimessageApicancel_scheduled_messageDELETE /omnimessage/{omnimessage_id}Cancels a scheduled Omnimessage
Omnichannel::OmnimessageApisend_omnimessagePOST /omnimessageSends an Omnimessage

Documentation for Models

Documentation for Authorization

basicAuth

  • Type: HTTP basic authentication

FAQs

Package last updated on 17 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc