slipmate 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.txt +11 -8
- data/Rakefile +3 -3
- data/lib/slipmate.rb +3 -1
- data/lib/slipmate/api.rb +2 -3
- data/slipmate.gemspec +1 -1
- metadata +3 -3
data/README.txt
CHANGED
@@ -1,32 +1,35 @@
|
|
1
1
|
slipmate
|
2
|
-
by
|
3
|
-
|
2
|
+
by Spencer Markowski
|
3
|
+
http://theablefew.com
|
4
4
|
|
5
5
|
== DESCRIPTION:
|
6
6
|
|
7
|
-
|
7
|
+
Slipmate is a web based order fulfillment application that gives you control over advanced order routing and shipping.
|
8
8
|
|
9
9
|
== FEATURES/PROBLEMS:
|
10
10
|
|
11
|
-
|
11
|
+
Create orders
|
12
12
|
|
13
13
|
== SYNOPSIS:
|
14
14
|
|
15
|
-
|
15
|
+
@order = Slipmate::Order.new({:shipping_first_name => "spencer", :shipping_last_name => "Markowski", :shipping_address_1 => "1234 Main Street", :shipping_city => "Fishers", :shipping_state => "IN", :shipping_zip => "46038", :shipping_tld => "USA", :shipping_method_code => "UPS", :shipping_amount => "1.27", :order_date => DateTime.now.to_s })
|
16
|
+
@customer = Slipmate::Customer.new( {:first_name => "spencer", :last_name => "markowski", :address_1 => "1234 Main Street", :city => "Fishers", :state => "IN", :zip => "46038" , :tld => "USA", :phone => "317-555-1212"})
|
17
|
+
@items << Slipmate::Item.new({:item_code => "WHITE_SCARF", :quantity => 3, :unit_price => 15})
|
18
|
+
|
19
|
+
puts Slipmate::API.create_order( @customer, @order, @items )
|
16
20
|
|
17
21
|
== REQUIREMENTS:
|
18
22
|
|
19
|
-
* FIXME (list of requirements)
|
20
23
|
|
21
24
|
== INSTALL:
|
22
25
|
|
23
|
-
|
26
|
+
sudo gem install slipmate
|
24
27
|
|
25
28
|
== LICENSE:
|
26
29
|
|
27
30
|
(The MIT License)
|
28
31
|
|
29
|
-
Copyright (c) 2009
|
32
|
+
Copyright (c) 2009
|
30
33
|
|
31
34
|
Permission is hereby granted, free of charge, to any person obtaining
|
32
35
|
a copy of this software and associated documentation files (the
|
data/Rakefile
CHANGED
@@ -10,8 +10,8 @@ task 'gem:release' => 'test:run'
|
|
10
10
|
|
11
11
|
Bones {
|
12
12
|
name 'slipmate'
|
13
|
-
authors '
|
14
|
-
email '
|
15
|
-
url '
|
13
|
+
authors 'Spencer Markowski'
|
14
|
+
email 'spencer@theablefew.com'
|
15
|
+
url 'http://slipmate.biz'
|
16
16
|
}
|
17
17
|
|
data/lib/slipmate.rb
CHANGED
@@ -23,6 +23,8 @@ require 'slipmate/item'
|
|
23
23
|
# @item = Slipmate::Item.new({:item_code => "WHITE_SCARF", :quantity => 3, :unit_price => 15})
|
24
24
|
# @items = [@item]
|
25
25
|
# p Slipmate::API.create_order( @customer, @order, @items )
|
26
|
-
|
26
|
+
#
|
27
|
+
# Slipmate::API.base_uri "slipmate.local:3000"
|
28
|
+
# Slipmate::API.api_key = "4030340"
|
27
29
|
|
28
30
|
# puts @order
|
data/lib/slipmate/api.rb
CHANGED
@@ -3,13 +3,12 @@ module Slipmate
|
|
3
3
|
include HTTParty
|
4
4
|
base_uri "http://slipmate.biz/api"
|
5
5
|
default_params :output => "json"
|
6
|
-
|
7
|
-
|
6
|
+
cattr_accessor :api_key
|
8
7
|
|
9
8
|
def self.create_order(customer, order , items)
|
10
9
|
serialized_items = items.collect{|item| item.serialize }
|
11
10
|
puts order.serialize.inspect
|
12
|
-
results = self.post("/create_order.json", :body => {:api_key =>
|
11
|
+
results = self.post("/create_order.json", :body => {:api_key => api_key,
|
13
12
|
:customer => customer.serialize,
|
14
13
|
:order => order.serialize,
|
15
14
|
:items => serialized_items },
|
data/slipmate.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slipmate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Spencer Markowski
|