Module: Bitreserve::Endpoints

Defined in:
lib/bitreserve/api/endpoints.rb

Constant Summary collapse

AUTH =
'/me/tokens'
CARD =
'/me/cards'
CARD_PRIVATE_TRANSACTIONS =
CARD + '/:card/transactions'
COMMIT_TRANSACTION =
CARD_PRIVATE_TRANSACTIONS + '/:id/commit'
CANCEL_TRANSACTION =
CARD_PRIVATE_TRANSACTIONS + '/:id/cancel'
RESEND_TRANSACTION =
CARD_PRIVATE_TRANSACTIONS + '/:id/resend'
USER_PRIVATE_TRANSACTIONS =
'/me/transactions'
PUBLIC_TRANSACTIONS =
'/reserve/transactions'
STATS =
'/reserve/statistics'
TICKER =
'/ticker'
TRANSACTIONS =
'/reserve/transactions'
USER =
'/me'
USER_CONTACTS =
'/me/contacts'
USER_PHONES =
'/me/phones'

Class Method Summary collapse

Class Method Details

.with_placeholders(endpoint, substitutions = {}) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/bitreserve/api/endpoints.rb', line 18

def self.with_placeholders(endpoint, substitutions = {})
  new_endpoint = endpoint.dup
  substitutions.each_pair do |placeholder, substitute|
    new_endpoint.gsub!(placeholder, substitute)
  end
  new_endpoint
end