rallio 0.5.0 → 0.6.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 +10 -12
- data/lib/rallio/account.rb +11 -5
- data/lib/rallio/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e160a5c2e852d27441a5c386a38dffa2d4f4d219
|
4
|
+
data.tar.gz: 5e37c2fe67afdbb8f1d634b47eac1d6413a00f6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01424d9ac92ad4773732b7d1c4253f2c8aeb08c80d67e9c7f75b5394335eee36eccbfdb7624ffa48aa99c92c73f7b98ff5c7c83629e2f885198e64cd26e15fde
|
7
|
+
data.tar.gz: d889ea2e47a406188e256c7cd511544c540e231c8abcf2b38449b136717a6f94c07956da8dd5c3e2afa7991d70d88b7c1999f8e274a3fa0f685c2910c0a9335e
|
data/README.md
CHANGED
@@ -254,24 +254,22 @@ accounts = Rallio::Account.for(franchisor_id: 200)
|
|
254
254
|
# => [<Rallio::Account:0x007f801bb0a610 @id=100, @name="Awesome Haircuts New York City", @short_name="AH-NYC", @url="https://awesomehaircuts.fake", @city="New York", @country_code="US", @time_zone="Eastern Time (US & Canada)">]
|
255
255
|
```
|
256
256
|
|
257
|
-
#### .
|
257
|
+
#### .create
|
258
258
|
|
259
259
|
Creates account for given franchisor_id.
|
260
260
|
|
261
261
|
```ruby
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
time_zone: 'Central Time (US & Canada)'
|
270
|
-
}
|
262
|
+
account = {
|
263
|
+
name: 'Awesome Test Account',
|
264
|
+
short_name: 'ATA-1',
|
265
|
+
url: 'https://ata.example',
|
266
|
+
city: 'Narnia',
|
267
|
+
country_code: 'US',
|
268
|
+
time_zone: 'Central Time (US & Canada)'
|
271
269
|
}
|
272
270
|
|
273
|
-
Rallio::Account.create(franchisor_id: 200,
|
274
|
-
# =>
|
271
|
+
Rallio::Account.create(franchisor_id: 200, account: account)
|
272
|
+
# => <Rallio::Account:0x007f801bb0a610 @id=100, @name="Awesome Test Account", @short_name="ATA-1", @url="https://ata.example", @city="Narnia", @country_code="US", @time_zone="Central Time (US & Canada)">
|
275
273
|
```
|
276
274
|
|
277
275
|
#### #reviews
|
data/lib/rallio/account.rb
CHANGED
@@ -36,11 +36,17 @@ module Rallio
|
|
36
36
|
# Creates an account.
|
37
37
|
#
|
38
38
|
# @param franchisor_id [Integer] franchisor_id to create account under
|
39
|
-
# @param
|
40
|
-
# @option
|
41
|
-
# @
|
42
|
-
|
43
|
-
|
39
|
+
# @param account [Hash]
|
40
|
+
# @option account [String] :name
|
41
|
+
# @option account [String] :short_name slug or other identifier
|
42
|
+
# @option account [String] :url
|
43
|
+
# @option account [String] :city
|
44
|
+
# @option account [String] :country_code
|
45
|
+
# @option account [String] :time_zone
|
46
|
+
# @return [Rallio::Account] hash of account created
|
47
|
+
def self.create(franchisor_id:, account:)
|
48
|
+
response = self.post("/franchisors/#{franchisor_id}/accounts", headers: app_credentials, body: { account: account })
|
49
|
+
new response.parsed_response
|
44
50
|
end
|
45
51
|
|
46
52
|
# Retreives reviews for the account.
|
data/lib/rallio/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rallio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JD Guzman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: virtus
|