saasu2 0.1.0.pre → 0.1.1
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 +60 -3
- data/lib/saasu/base.rb +2 -0
- data/lib/saasu/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00d34d8d6d01b5a1ba07efb6a978829a6ca8e78f
|
4
|
+
data.tar.gz: 8864f8c57abb79e676cfc465e85f571e17f15c9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9289d659a6c7f098d3b1a85c3f81483b2fa699af3adce974b377d8ee899f94fa6ff850107aaffb7a82178fb2cf0c86474204e751c4f0e41f8f5b9a3cd2648e8
|
7
|
+
data.tar.gz: 87af3716b0aabaa9db71677d66322bf6100f293c7507fdc7e7e010e8986bba9fe25b244442741dd546f27a9d4a3b2c5c945532f911127cfe96030f00280c0cc3
|
data/README.md
CHANGED
@@ -17,13 +17,70 @@ And then execute:
|
|
17
17
|
|
18
18
|
$ bundle
|
19
19
|
|
20
|
-
|
20
|
+
Create an initializer file with your Saasu configuration eg config/initilizers/saasu.rb
|
21
|
+
```ruby
|
22
|
+
require 'saasu'
|
23
|
+
|
24
|
+
Saasu::Config.configure do |c|
|
25
|
+
c.username = 'username@email.com'
|
26
|
+
c.password = 'password'
|
27
|
+
c.file_id = 1234 # Your Saasu FileId can be found at
|
28
|
+
end
|
29
|
+
```
|
30
|
+
|
31
|
+
You're now ready to connect your app to Saasu.
|
32
|
+
|
33
|
+
## Usage
|
34
|
+
|
35
|
+
You can access the following objects:
|
36
|
+
- Saasu::Account
|
37
|
+
- Saasu::Company
|
38
|
+
- Saasu::Contact
|
39
|
+
- Saasu::Invoice
|
40
|
+
- Saasu::InvoiceAttachment
|
41
|
+
- Saasu::Item
|
42
|
+
- Saasu::Payment
|
43
|
+
- Saasu::TaxCode
|
44
|
+
|
45
|
+
Usage examples:
|
46
|
+
|
47
|
+
```ruby
|
48
|
+
# get all contacts
|
49
|
+
contacts = Saasu::Contact.all
|
50
|
+
|
51
|
+
# find a contact by id
|
52
|
+
contact = Saasu::Contact.find(123)
|
53
|
+
|
54
|
+
# save a contact
|
55
|
+
contact.given_name = 'New Name'
|
56
|
+
contact.save
|
57
|
+
|
58
|
+
# delete a contact
|
59
|
+
contact.delete
|
60
|
+
|
61
|
+
# create a contact
|
62
|
+
new_contact = Saasu::Contact.create({ GivenName => 'User' })
|
63
|
+
|
64
|
+
# filter records. for a list of available filters for each object see https://api.saasu.com
|
65
|
+
contact = Saasu::Contact.where(GivenName: 'John')
|
66
|
+
|
67
|
+
# get attributes
|
68
|
+
contact.id
|
69
|
+
contact['Id']
|
70
|
+
|
71
|
+
# set attributes
|
72
|
+
contact.given_name = 'Nick'
|
73
|
+
contact['GivenName'] = 'John'
|
74
|
+
|
75
|
+
# get all attributes
|
76
|
+
contact.attributes
|
77
|
+
```
|
21
78
|
|
22
|
-
|
79
|
+
Note - Saasu uses .NET naming convention for fields and filters eg. GivenName, LastModifiedDate
|
23
80
|
|
24
81
|
## Contributing
|
25
82
|
|
26
|
-
1. Fork it ( https://github.com/
|
83
|
+
1. Fork it ( https://github.com/saasu/saasu2-ruby/fork )
|
27
84
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
28
85
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
29
86
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/lib/saasu/base.rb
CHANGED
data/lib/saasu/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: saasu2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sinenko
|
@@ -198,9 +198,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
198
198
|
version: 1.9.0
|
199
199
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
200
200
|
requirements:
|
201
|
-
- - "
|
201
|
+
- - ">="
|
202
202
|
- !ruby/object:Gem::Version
|
203
|
-
version:
|
203
|
+
version: '0'
|
204
204
|
requirements: []
|
205
205
|
rubyforge_project:
|
206
206
|
rubygems_version: 2.2.2
|