Repository navigation
how to use step by test
require 'armor_payments' => false
client = ArmorPayments::API.new 'fac5d8a4eab1c348925a7a5421367d86', '6956753620b1cdecfbbcbe4a6f3287a4b748edc6b8eff1e8d8dbf23b679db8d5', sandbox=true
=> #<ArmorPayments::API:0x00000004cbc038 @authenticator=#<ArmorPayments::Authenticator:0x00000004cbc010 @api_key="fac5d8a4eab1c348925a7a5421367d86", @api_secret="6956753620b1cdecfbbcbe4a6f3287a4b748edc6b8eff1e8d8dbf23b679db8d5">, @sandbox=true>
client.accounts.create({"company"=>"TestCo", "user_name"=>"Test", "user_email"=>"te2st@example.com", "user_phone"=>"1231234567"}) => #<Excon::Response:0x00000004d824b8 @data={:body=>{"account_id"=>"352643", "company"=>"TestCo", "address"=>nil, "city"=>nil, "state"=>nil, "postal_code"=>nil, "country"=>nil, "phone"=>"1231234567", "created"=>"2014-09-24T17:32:47+00:00", "uri"=>"/accounts/352643"}, :headers=>{"Content-Type"=>"application/json", "Date"=>"Wed, 24 Sep 2014 17:32:47 GMT", "Server"=>"Apache/2.2.29 (Amazon)", "Content-Length"=>"202", "Connection"=>"keep-alive"}, :status=>200, :remote_ip=>"54.191.54.238", :local_port=>40079, :local_address=>"10.0.13.55"}, @body="{"account_id":"352643","company":"TestCo","address":null,"city":null,"state":null,"postal_code":null,"country":null,"phone":"1231234567","created":"2014-09-24T17:32:47+00:00","uri":"\/accounts\/352643"}", @headers={"Content-Type"=>"application/json", "Date"=>"Wed, 24 Sep 2014 17:32:47 GMT", "Server"=>"Apache/2.2.29 (Amazon)", "Content-Length"=>"202", "Connection"=>"keep-alive"}, @status=200, @remote_ip="54.191.54.238", @local_port=40079, @local_address="10.0.13.55">
client.accounts.get("352643") => #<Excon::Response:0x00000002d78118 @data={:body=>{"account_id"=>"352643", "company"=>"TestCo", "address"=>nil, "city"=>nil, "state"=>nil, "postal_code"=>nil, "country"=>nil, "phone"=>"1231234567", "created"=>"2014-09-24T17:32:47+00:00", "uri"=>"/accounts/352643"}, :headers=>{"Content-Type"=>"application/json", "Date"=>"Wed, 24 Sep 2014 17:33:37 GMT", "Server"=>"Apache/2.2.29 (Amazon)", "Content-Length"=>"202", "Connection"=>"keep-alive"}, :status=>200, :remote_ip=>"54.191.54.238", :local_port=>40080, :local_address=>"10.0.13.55"}, @body="{"account_id":"352643","company":"TestCo","address":null,"city":null,"state":null,"postal_code":null,"country":null,"phone":"1231234567","created":"2014-09-24T17:32:47+00:00","uri":"\/accounts\/352643"}", @headers={"Content-Type"=>"application/json", "Date"=>"Wed, 24 Sep 2014 17:33:37 GMT", "Server"=>"Apache/2.2.29 (Amazon)", "Content-Length"=>"202", "Connection"=>"keep-alive"}, @status=200, @remote_ip="54.191.54.238", @local_port=40080, @local_address="10.0.13.55">