No description, website, or topics provided.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
lib
spec
.gitignore
.rspec
.swagger-codegen-ignore
Gemfile
README.md
Rakefile
git_push.sh
swagger_client.gemspec

README.md

swagger_client

SwaggerClient - the Ruby gem for the SMS Fusion API

This is the SMS Fusion API

This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.RubyClientCodegen For more information, please visit https://www.smsfusion.com.au/help/

Installation

Build a gem

To build the Ruby code into a gem:

gem build swagger_client.gemspec

Then either install the gem locally:

gem install ./swagger_client-1.0.0.gem

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

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'swagger_client', '~> 1.0.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/smsfusion/smsfusion-ruby, then add the following in the Gemfile:

gem 'swagger_client', :git => 'https://github.com/smsfusion/smsfusion-ruby.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

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

# Load the gem
require 'swagger_client'

# Setup authorization
SwaggerClient.configure do |config|
  # Configure API key authorization: api_key
  config.api_key['key'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['key'] = 'Bearer'
end

api_instance = SwaggerClient::HLRApi.new

key = "key_example" # String | API Key as generated from the <a href='https://www.smsfusion.com.au/admin/api/'>admin panel</a>

num = "num_example" # String | A single phone number or <a href='https://www.smsfusion.com.au/help/msisdn/'>MSDISDN</a>

opts = { 
  cc: "cc_example" # String | 2 character country code <a href='https://en.wikipedia.org/wiki/ISO_3166-2'>ISO 3166-2</a> for formatting local numbers internationally
}

begin
  #HLR number lookup
  result = api_instance.get_hlr(key, num, opts)
  p result
rescue SwaggerClient::ApiError => e
  puts "Exception when calling HLRApi->get_hlr: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.smsfusion.com.au/

Class Method HTTP request Description
SwaggerClient::HLRApi get_hlr GET /hlr/ HLR number lookup
SwaggerClient::HLRApi get_hlr_callback GET /hlr-callback/ HLR number lookup with results going to a callback URL
SwaggerClient::SMSApi send_sms GET /sms/ Send an SMS

Documentation for Models

Documentation for Authorization

api_key

  • Type: API key
  • API key parameter name: key
  • Location: URL query string