unleashed 0.1.4 → 0.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 147bdc99b6e8ce42af1eb564d90374ccaa7ae220b41b3ccc5fed0fee3e23bb6e
4
- data.tar.gz: b5f3fc37b96ee6c404c95e00b33822f8025015b6e2dbe781ec25711d469a1d5d
3
+ metadata.gz: b8cf451e716eaf53fdd1c508701a506625f9d10f62a26cb7298e8b32a9832dc0
4
+ data.tar.gz: ed27ce803188bbaf52c87161d5adff85a9706a7f96d836e688199b1e622d88b1
5
5
  SHA512:
6
- metadata.gz: 334ecfd9f511222c578654b81e2a7054c16a7a2ed9f05b6b670e41119b8527c6cb714a024e5c56efb0a00fc1756f847d4b2285efccc0684ac1d5ae8211c0686a
7
- data.tar.gz: c9534ae24edb3ec3b933f1cbb5dc47510883583d93f9d20ca197a757542efc6d17085e8bc2cae1863ba14f16fd9846b25e04caa224e3ac517003923ef7c8468d
6
+ metadata.gz: ce74137ff724c846b635cc790f0031143ceb8dbc40cccff2e2e8b5db1bbcf5ff8d6401063130022583a8e69c2feccbb6894471339e6d7857973754103c6bceb8
7
+ data.tar.gz: c23906fd924b35d65cca03a2df50cc88a09a8503a6708b16b379b9a238b92e88824042fa86b503c248de1005079f1ef86f03fe5de73987837bbfbfde08df26fe
data/.gitignore CHANGED
@@ -7,6 +7,5 @@
7
7
  /spec/reports/
8
8
  /tmp/
9
9
 
10
- # rspec failure tracking
11
10
  .rspec_status
12
11
  Gemfile.lock
data/.rspec CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  --format documentation
2
3
  --color
3
4
  --require spec_helper
data/.ruby-version CHANGED
@@ -1 +1,2 @@
1
+
1
2
  2.5.0
data/.travis.yml CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  sudo: false
2
3
  language: ruby
3
4
  rvm:
data/CHANGELOG.md CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  # Change Log
2
3
 
3
4
  All notable changes to this project will be documented in this file.
data/CODE_OF_CONDUCT.md CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  # Contributor Covenant Code of Conduct
2
3
 
3
4
  ## Our Pledge
data/Gemfile CHANGED
@@ -3,4 +3,5 @@ source 'https://rubygems.org'
3
3
  git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
5
  # Specify your gem's dependencies in unleashed.gemspec
6
+
6
7
  gemspec
data/LICENSE CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  MIT License
2
3
 
3
4
  Copyright (c) 2019 Nathan
data/LICENSE.txt CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  The MIT License (MIT)
2
3
 
3
4
  Copyright (c) 2019 Nhan Nguyen
data/README.md CHANGED
@@ -18,11 +18,57 @@ Or install it yourself as:
18
18
 
19
19
  $ gem install unleashed
20
20
 
21
- ## 2. Usage
21
+ ## 2. Configuration
22
22
 
23
- TODO: Write usage instructions here
23
+ Before interacting with Unleashed API you need to sign up an account.
24
24
 
25
- ## 3. Contributing
25
+ See [Unleashed API Documentation](https://apidocs.unleashedsoftware.com/) for more information.
26
+
27
+ ### Create a Unleashed client
28
+
29
+ The client can be configured through environment variables.
30
+
31
+ ```ruby
32
+ # In your environment file
33
+ # Default
34
+ UNLEASHED_API_DOMAIN = api.unleashedsoftware.com
35
+ UNLEASHED_CLIENT_TYPE_HEADER = API-Sandbox
36
+
37
+ UNLEASHED_API_ID = yourapiid
38
+ UNLEASHED_API_KEY = yourapikey
39
+ ```
40
+
41
+ The following parameters are configurable through the client:
42
+
43
+ * `:api_domain` / `ENV['UNLEASHED_API_DOMAIN']`: API domain name to use (default: 'api.unleashedsoftware.com')
44
+ * `:api_id` / `ENV['UNLEASHED_API_ID']`: API ID
45
+ * `:api_key` / `ENV['UNLEASHED_API_KEY']`: API KEY
46
+ * `:client_type_header` / `ENV['UNLEASHED_CLIENT_TYPE_HEADER']`: Client Type Header to use (default: 'API-Sandbox')
47
+
48
+ ## 3. Usage
49
+
50
+ ### Instantiate the Unleashed client
51
+
52
+ ```ruby
53
+ options = { api_id: ENV['UNLEASHED_API_ID'], api_key: ENV['UNLEASHED_API_KEY'] }
54
+ client = Unleashed::Client.new(options)
55
+ ```
56
+
57
+ ### Customers
58
+
59
+ #### Get all customers
60
+
61
+ ```ruby
62
+ client.customers.all
63
+ ```
64
+
65
+ #### Get a customer
66
+
67
+ ```ruby
68
+ client.customers.find('XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX')
69
+ ```
70
+
71
+ ## 4. Contributing
26
72
 
27
73
  1. Fork it [https://github.com/nnhansg/unleashed-ruby](https://github.com/nnhansg/unleashed-ruby)
28
74
  2. Create your feature branch (`git checkout -b my-new-feature`)
@@ -30,10 +76,10 @@ TODO: Write usage instructions here
30
76
  4. Push to the branch (`git push origin my-new-feature`)
31
77
  5. Create a new Pull Request
32
78
 
33
- ## 4. License
79
+ ## 5. License
34
80
 
35
81
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
36
82
 
37
- ## 5. Code of Conduct
83
+ ## 6. Code of Conduct
38
84
 
39
85
  Everyone interacting in the Unleashed project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/nnhansg/unleashed-ruby/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  require 'bundler/gem_tasks'
2
3
  require 'rspec/core/rake_task'
3
4
 
data/bin/.keep ADDED
File without changes
data/lib/.keep ADDED
File without changes
@@ -2,7 +2,7 @@ module Unleashed
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 4
5
+ TINY = 5
6
6
 
7
7
  STRING = "#{MAJOR}.#{MINOR}.#{TINY}".freeze
8
8
  end
data/unleashed.gemspec CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  lib = File.expand_path('../lib', __FILE__)
2
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
4
  require 'unleashed/version'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unleashed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nhan Nguyen
@@ -104,8 +104,10 @@ files:
104
104
  - LICENSE.txt
105
105
  - README.md
106
106
  - Rakefile
107
+ - bin/.keep
107
108
  - bin/console
108
109
  - bin/setup
110
+ - lib/.keep
109
111
  - lib/unleashed.rb
110
112
  - lib/unleashed/client.rb
111
113
  - lib/unleashed/configurable.rb