Sha256: d7d4e99b462c2ea9a53242cacd5b569bff46f3c2a31b7d23fea714bab5638d65
Contents?: true
Size: 579 Bytes
Versions: 1
Compression:
Stored size: 579 Bytes
Contents
module MangoPay class Client < Resource def self.create(params) uri = URI(MangoPay.configuration.root_url + '/api/clients/') res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https') do |http| request = Net::HTTP::Post.new(uri.request_uri, { 'user_agent' => "MangoPay V1 RubyBindings/#{MangoPay::VERSION}", 'Content-Type' => 'application/json' }) request.body = MangoPay::JSON.dump(params) http.request request end MangoPay::JSON.load(res.body) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mangopay-3.0.1 | lib/mangopay/client.rb |