Module: CoinsPaid::API::Requester
Instance Method Summary collapse
Instance Method Details
#call(api, data) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/coins_paid/api/requester.rb', line 8 def call(api, data) request_data = api::Request.new(data) Transport.post(api::PATH, request_data.to_hash) .yield_self { |response| parse(response) } .yield_self { |parsed_response| api::Response.new(parsed_response) } end |