Class: XRBP::Model::Gateway

Inherits:
Base
  • Object
show all
Extended by:
Base::ClassMethods
Defined in:
lib/xrbp/model/gateway.rb

Instance Attribute Summary

Attributes included from Base::ClassMethods

#connection, #opts

Attributes inherited from Base

#connection, #opts

Class Method Summary collapse

Methods included from Base::ClassMethods

set_opts

Methods inherited from Base

#full_opts, #initialize, #set_opts

Constructor Details

This class inherits a constructor from XRBP::Model::Base

Class Method Details

.all(opts = {}) ⇒ Object

Retrieve list of gateways provided WebClient::Connection.

Parameters:

  • opts (Hash) (defaults to: {})

    options to retrieve gateway list with

Options Hash (opts):



13
14
15
16
17
18
19
20
21
# File 'lib/xrbp/model/gateway.rb', line 13

def self.all(opts={})
  set_opts(opts)
  connection.url = "https://data.ripple.com/v2/gateways"

  connection.add_plugin :result_parser   unless connection.plugin?(:result_parser)
  connection.add_plugin Parsers::Gateway unless connection.plugin?(Parsers::Gateway)

  connection.perform
end