Class: Remitano::Client::PublicOffers

Inherits:
Collection
  • Object
show all
Defined in:
lib/remitano/client/public/offers.rb

Instance Attribute Summary

Attributes inherited from Collection

#config, #path, #resource_name

Instance Method Summary collapse

Methods inherited from Collection

#all, #create, #get, #initialize, #update

Constructor Details

This class inherits a constructor from Remitano::Client::Collection

Instance Method Details

#buy_offers(params = {}) ⇒ Object



8
9
10
11
# File 'lib/remitano/client/public/offers.rb', line 8

def buy_offers(params = {})
  params[:offer_type] = "buy"
  offers(params)
end

#offers(params = {}) ⇒ Object



4
5
6
# File 'lib/remitano/client/public/offers.rb', line 4

def offers(params = {} )
  Remitano::Client::Net.public_get("/offers", params).execute.offers
end

#sell_offers(params = {}) ⇒ Object



13
14
15
16
# File 'lib/remitano/client/public/offers.rb', line 13

def sell_offers(params = {})
  params[:offer_type] = "sell"
  offers(params)
end