simple_desk 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +28 -2
- data/RELEASE.md +3 -0
- data/lib/simple_desk/version.rb +1 -1
- data/lib/simple_desk.rb +5 -5
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e55d130b67924254d3ce35e5304e85c3a24ebfc7
|
4
|
+
data.tar.gz: 6d5ddf600020468187e31018176219d5515b8a08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f371a2f54d8dc74aa58d6e5650d1313a70ffc697927d4be771bc791dd7b1cb9dd948ebd69bbd54241898051c106a584ab1ff0c567778cf896225ea6dc8a4d8d1
|
7
|
+
data.tar.gz: 44f488cb5fd882c96dc53ed70f7e6f5fa88544f053ac43dd773362c65e209a13da14f33b54933b0934d97445546fbaae3415b7ae700e0e017c9d047c58b120e9
|
data/README.md
CHANGED
@@ -6,6 +6,8 @@
|
|
6
6
|
|
7
7
|
- Make generator to accept your API key
|
8
8
|
- Add ability to pass in properties and convert to base 64
|
9
|
+
- Add auto capitalization for names
|
10
|
+
- Parse formatting for phone number
|
9
11
|
|
10
12
|
## Installation
|
11
13
|
|
@@ -23,8 +25,32 @@ Or install it yourself as:
|
|
23
25
|
|
24
26
|
## Usage
|
25
27
|
|
26
|
-
|
27
|
-
|
28
|
+
#Adding Customers
|
29
|
+
To get started and add a new customer, run:
|
30
|
+
SimpleDesk.add_customer({phone_number: "1231231232"})
|
31
|
+
|
32
|
+
While `phone_number` is required, you can pass additional properties in:
|
33
|
+
- phone_number (required)
|
34
|
+
- email (optional)
|
35
|
+
- first_name (optional)
|
36
|
+
- last_name (optional)
|
37
|
+
|
38
|
+
Like this:
|
39
|
+
|
40
|
+
params = {phone_number: "1231231232", email: "elijah@example.com", first_name: "Elijah", last_name: "Murray"}
|
41
|
+
SimpleDesk.add_customer(params)
|
42
|
+
|
43
|
+
|
44
|
+
#Messaging
|
45
|
+
To message a user the format is similar
|
46
|
+
Note: They do not have to be existing in the system to message. You'll automatically create a new user if you message a new phone number
|
47
|
+
|
48
|
+
message_and_phone_number = {to: 5551231234, text: "Howdy partner!"}
|
49
|
+
SimpleDesk.message_customer(message_and_phone_number)
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
or you if you want to pass in other details, you can
|
28
54
|
|
29
55
|
## Contributing
|
30
56
|
|
data/RELEASE.md
ADDED
data/lib/simple_desk/version.rb
CHANGED
data/lib/simple_desk.rb
CHANGED
@@ -13,7 +13,12 @@ module SimpleDesk
|
|
13
13
|
end
|
14
14
|
# alias_method :update_customer, :add_customer
|
15
15
|
|
16
|
+
def self.message_customer(message_and_phone_number)
|
17
|
+
uri = URI.parse(post_url("message_customer"))
|
18
|
+
response = Net::HTTP.post_form(uri, message_and_phone_number)
|
19
|
+
end
|
16
20
|
|
21
|
+
private
|
17
22
|
def self.build_url(post_type = nil, params=nil)
|
18
23
|
url = post_url(post_type)
|
19
24
|
|
@@ -42,9 +47,4 @@ module SimpleDesk
|
|
42
47
|
end
|
43
48
|
end
|
44
49
|
|
45
|
-
def self.message_customer(message_and_phone_number)
|
46
|
-
uri = URI.parse(post_url("message_customer"))
|
47
|
-
response = Net::HTTP.post_form(uri, message_and_phone_number)
|
48
|
-
end
|
49
|
-
|
50
50
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_desk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elijah Murray
|
@@ -77,6 +77,7 @@ files:
|
|
77
77
|
- Gemfile
|
78
78
|
- LICENSE.txt
|
79
79
|
- README.md
|
80
|
+
- RELEASE.md
|
80
81
|
- Rakefile
|
81
82
|
- lib/simple_desk.rb
|
82
83
|
- lib/simple_desk/version.rb
|