class XRBP::WebSocket::Cmds::BookOffers

The book_offers method retrieves a list of offers, also known as the order book , between two currencies

developers.ripple.com/book_offers.html

Attributes

args[RW]

Public Class Methods

from_h(h) click to toggle source
# File lib/xrbp/websocket/cmds/book_offers.rb, line 23
def self.from_h(h)
   new Hash[h]
end
new(args={}) click to toggle source
Calls superclass method
# File lib/xrbp/websocket/cmds/book_offers.rb, line 17
def initialize(args={})
  @args = args
  parse_paginate(args)
  super(to_h)
end

Public Instance Methods

page_title() click to toggle source
# File lib/xrbp/websocket/cmds/book_offers.rb, line 11
def page_title
  "offers"
end
sanitized_args() click to toggle source
# File lib/xrbp/websocket/cmds/book_offers.rb, line 27
def sanitized_args
  sa = Hash[args_without_paginate]

  sa[:taker_gets].delete(:issuer) if sa[:taker_gets][:currency] == "XRP"
  sa[:taker_pays].delete(:issuer) if sa[:taker_pays][:currency] == "XRP"

  sa
end
to_h() click to toggle source
# File lib/xrbp/websocket/cmds/book_offers.rb, line 36
def to_h
  sanitized_args.merge(:command => :book_offers)
end