No commit activity in last 3 years
No release in over 3 years
A wrapper around the synergy wholesale reseller API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

~> 0.1.1
~> 2.11.0
 Project Readme

synergy_wholesale

Gem Version Build Status Dependency Status

Installation

Synergy Wholesale is available through Rubygems and can be installed via:

$ gem install synergy_wholesale

or add it to your Gemfile like this:

gem 'synergy_wholesale'

Usage example

require 'synergy_wholesale'

# configure Synergy Wholesale
SynergyWholesale.setup do |config|
  config.reseller_id = '12345'
  config.api_key = 'abc123'
end

# call an operation
response = SynergyWholesale::CheckDomain.call(domain: { name: 'example.com'})

response.body
# => { status: 'UNAVAILABLE', available: '0' }

response.is_available?
# => false

# Or do things manually
# create an instance of the api adapter
api = SynergyWholesale::API.new

# create a command
command = SynergyWholesale::CheckDomain::Command.new(SynergyWholesale::Types::Domain.new(name: 'example.com'))

command.to_param
# => { domain_name: 'example.com' }

# call the 'checkDomain' command
response = api.call(command)

response.body
# => { status: 'UNAVAILABLE', available: '0' }

response.is_available?
# => false

License

See LICENSE file.