The Square Connect API gem provides access to the Square Connect API.
TODO:
- Data Types (in progress)
- Transaction Management
- Item Management (in progress)
- OAuth
- Batching
- API Webhooks
- Subscription Management
- Multi-Location Management
- Employee Management
Add this line to your application's Gemfile:
gem 'square-ruby', require: 'square'
And then execute:
$ bundle
Or install it yourself as:
$ gem install square-ruby
TODO
...but quickly, use one of the methods on one of the APIResource
subclasses, e.g.
items = Square::Item.list
You'll now have an array of Square::DataType::Item
s.
Paging only works for APIResource#list
.
resp = Square::Payment.list({limit: 10})
resp.each {|p| puts p.id }
puts "got #{resp.count}. getting more"
while resp.has_more?
puts "has more"
more = resp.more
more.each {|p| puts p.id }
end
puts 'done'
TODO
TODO