Skip to content

delongtj/square-ruby

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Square Connect API

Gem Version Code Climate Test Coverage Build Status

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

Documentation

Square Connect
RubyDoc

Installation

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

Usage

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::Items.

Paging

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'

Development

TODO

Contributing

TODO

About

Square Connect API v1

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 99.9%
  • Shell 0.1%