Skip to content

Latest commit

 

History

History
48 lines (26 loc) · 1.78 KB

File metadata and controls

48 lines (26 loc) · 1.78 KB

AriaApi Build Status

Ruby wrap for the aria billing and subscriptions API.

Installation

gem install aria_api

For Rails Apps. Just add this to Gemfile.

gem "aria_api"

Configuration

First you'll need to define your credentials:

AriaApi::Configuration.auth_key = "the-key"
AriaApi::Configuration.client_no = "the-client"
AriaApi::Configuration.url = "https://secure.future.stage.ariasystems.net/api/ws/api_ws_class_dispatcher.php"

In Rails. You could define specific configuration for each environment.

There's also a parameter to define the version of the Aria API you want to use. Default is 6.8

AriaApi::Configuration.api_version = "6.9"

Caching WSDL

In order to avoid downloading all of the SOAP actions from a remote wsdl like https://secure.future.stage.ariasystems.net/api/Advanced/wsdl/6.4/complete-doc_literal_wrapped.wsdl you may optionally define the following option:

AriaApi::Configuration.wsdl_path = File.join("path", "to", "fixtures","aria_api_6_8.wsdl")

Usage

AriaApi supports most of the API features defined in https://developer.ariasystems.net/apidocs/web/app.php/api_docs.

Just call the service name as an AriaApi method, the options are the same as the specified in the API docs.

AriaApi.get_country_from_ip(ip_address: "207.97.227.239")
# { "country_code" => "US", "country_name" => "United States", "error_code" => 0, "error_msg" => "OK" }

Note you don't need to pass credentials since they're already defined in the configuration module.

Demo Application

Code

Live App