Project

zinc

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Ruby bindings for the Zinc(https://zinc.io) API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

Zinc Ruby Bindings¶ ↑

Introduction¶ ↑

Ruby bindings for the Zinc API

Heavily inspired by the Stripe Ruby Bindings

By Julian Simioni

Usage¶ ↑

Zinc.api_key = "your-api-key" # set the API key first

new_order = Zinc::Order.create({:address => {
     name: "Tim Beaver",
     address_line1: "77 Massachusetts Avenue",
     zip_code: "02139",
     city: "Cambridge",
     state: "MA",
     country: "US"
  },
  :address_suggestion_choice => "suggested",
  :products => [
     {
        :pid => "B003L1ZYYM",
        :pid_type => "ASIN",
     },
     {
        :pid => "0833030477",
        :pid_type => "ASIN",
     }
  ]})

  # all parameters returned by the {Zinc API}[https://zinc.io/docs] can be used as accessors
  puts new_order.ship_date_estimate # => 1336120454