From 31da92eef33afec542f4180dc1110623ea30b7b9 Mon Sep 17 00:00:00 2001 From: Aldo Delgado Date: Sat, 3 Jan 2015 04:07:02 -0500 Subject: [PATCH] Added items to api calls --- lib/square/connect/api/items.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 lib/square/connect/api/items.rb diff --git a/lib/square/connect/api/items.rb b/lib/square/connect/api/items.rb new file mode 100644 index 0000000..903b602 --- /dev/null +++ b/lib/square/connect/api/items.rb @@ -0,0 +1,22 @@ +require 'square/utils/api' +#require 'square/connect/model/item' + +module Square + module Connect + module API + module Items + include Square::Utils::API + + # Provides summary information for all of a merchant's items. + # + # @see + # @note Authentication Required + # @raise [Square::Error::Unauthorized] Error raised when supplied user credentials are invalid. + # @return [Square::Connect::Items] + def items(merchant_id = 'me') + object_from_response(Square::Connect::Item, :get, "/#{merchant_id}/items") + end + end + end + end +end