Ruby gem for interacting with the Squarespace API.
Add this line to your application's Gemfile:
gem 'squarespace'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install squarespace
client = Squarespace::Client.new(
app_name: 'YOUR_APP_NAME'
app_secret: 'YOUR_CLIENT_SECRET'
)
client.get_order(order_id)
client.get_orders
client.get_orders('pending')
client.get_orders('fulfilled')
client.get_orders('canceled')
client.fulfill_order(order_id, shipments, send_notification)
`shipments` is a hash array in the form of
[{
tracking_number: 'test_tracking_number1',
tracking_url: 'https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=test_tracking_number2',
carrier_name: 'USPS',
service: 'ground'
},{
tracking_number: 'test_tracking_number2',
tracking_url: nil,
carrier_name: 'USPS',
service: 'prioritt'
}]
bundle exec rspec