Skip to content

Instantly share code, notes, and snippets.

@matthewfl
Created June 5, 2013 17:20
Show Gist options
  • Save matthewfl/5715593 to your computer and use it in GitHub Desktop.
Save matthewfl/5715593 to your computer and use it in GitHub Desktop.
[10:15:10 matthew]% irb ~/balanced/balanc
irb(main):001:0> require 'balanced'
=> true
irb(main):002:0> Balanced.configure('83b9b666cd9411e2b213026ba7cac9da')
=> #<Balanced::Client:0x000000026f0a70 @api_key="83b9b666cd9411e2b213026ba7cac9da", @config={:scheme=>"https", :host=>"api.balancedpayments.com", :port=>443, :version=>"1", :logging_level=>"WARN", :connection_timeout=>30, :read_timeout=>30, :logger=>nil, :ssl_verify=>true, :faraday_adapter=>:net_http}, @conn=#<Faraday::Connection:0x000000026e7ad8 @headers={"User-Agent"=>"balanced-ruby/0.7.1"}, @params={}, @options={:open_timeout=>30, :timeout=>30}, @ssl={:verify=>true}, @parallel_manager=nil, @default_parallel_manager=nil, @builder=#<Faraday::Builder:0x000000026e79c0 @handlers=[FaradayMiddleware::EncodeJson, Faraday::Response::Logger, Faraday::Response::RaiseBalancedError, FaradayMiddleware::ParseJson, Faraday::Adapter::NetHttp]>, @url_prefix=#<URI::HTTPS:0x000000026e7cb8 URL:https://api.balancedpayments.com/>, @proxy=nil>>
irb(main):003:0> Balanced::Marketplace.my_marketplace
=> #<Balanced::Marketplace:0x00000002169e80 @attributes={"support_email_address"=>"[email protected]", "_type"=>"marketplace", "accounts_uri"=>"/v1/marketplaces/TEST-MP40OULSEv6uGviExJUIeGms/accounts", "meta"=>{}, "id"=>"TEST-MP40OULSEv6uGviExJUIeGms", "domain_url"=>"example.com", "owner_account_uri"=>"/v1/marketplaces/TEST-MP40OULSEv6uGviExJUIeGms/accounts/AC40PopnUkTk428PZCc0YfhK", "customer_uri"=>"/v1/customers/AC40PopnUkTk428PZCc0YfhK", "callbacks_uri"=>"/v1/marketplaces/TEST-MP40OULSEv6uGviExJUIeGms/callbacks", "events_uri"=>"/v1/events", "bank_accounts_uri"=>"/v1/marketplaces/TEST-MP40OULSEv6uGviExJUIeGms/bank_accounts", "_uris"=>{"callbacks_uri"=>{"_type"=>"page", "key"=>"callbacks"}, "transactions_uri"=>{"_type"=>"page", "key"=>"transactions"}, "events_uri"=>{"_type"=>"page", "key"=>"events"}, "bank_accounts_uri"=>{"_type"=>"page", "key"=>"bank_accounts"}, "refunds_uri"=>{"_type"=>"page", "key"=>"refunds"}, "debits_uri"=>{"_type"=>"page", "key"=>"debits"}, "customers_uri"=>{"_type"=>"page", "key"=>"customers"}, "holds_uri"=>{"_type"=>"page", "key"=>"holds"}, "accounts_uri"=>{"_type"=>"page", "key"=>"accounts"}, "credits_uri"=>{"_type"=>"page", "key"=>"credits"}, "cards_uri"=>{"_type"=>"page", "key"=>"cards"}}, "transactions_uri"=>"/v1/marketplaces/TEST-MP40OULSEv6uGviExJUIeGms/transactions", "credits_uri"=>"/v1/marketplaces/TEST-MP40OULSEv6uGviExJUIeGms/credits", "cards_uri"=>"/v1/marketplaces/TEST-MP40OULSEv6uGviExJUIeGms/cards", "in_escrow"=>0, "holds_uri"=>"/v1/marketplaces/TEST-MP40OULSEv6uGviExJUIeGms/holds", "name"=>"Test Marketplace", "uri"=>"/v1/marketplaces/TEST-MP40OULSEv6uGviExJUIeGms", "support_phone_number"=>"+16505551234", "refunds_uri"=>"/v1/marketplaces/TEST-MP40OULSEv6uGviExJUIeGms/refunds", "debits_uri"=>"/v1/marketplaces/TEST-MP40OULSEv6uGviExJUIeGms/debits", "customers_uri"=>"/v1/customers"}>
irb(main):004:0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment