gonebusy-ruby-client 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 40f500630fb7942d0119301e9b1c7b83b63e9756
4
- data.tar.gz: 4884ce20af8d137ecb9d76f9d3db938f1d23d984
3
+ metadata.gz: 3b2d5f733660c7afd7ce6d09a5b7ce007a32c2fb
4
+ data.tar.gz: 04ec3d18b5f7abf7f0488c0f5dd320df4804164b
5
5
  SHA512:
6
- metadata.gz: fc3d73fcad9437b7eb61ac979b5f330a69afa0039307901fa0a1c4e9005819aba41f195afc97ed27c57c56b673e817fa6d184d0dfb0d53edd2b6082e8eb98a83
7
- data.tar.gz: 292016a74993adabfcba72576ff19b780375a47a48922e5d2122a29ebeef7a66dd13effcd64fc58899317b7f21bacc57c2690f0e6b7d174af1ccd146c8fb8af1
6
+ metadata.gz: 8a6fff635ce3817420291bc61c590e1b594afb88545a011bba57da9596e2d6125867b8d4b4d450d0bb29791dafc63fcbcf3650efd58e8901c1713ab321b07b36
7
+ data.tar.gz: 3bddafa25b76d6f9709863f0b7232f1c5bd72617b0031e91d7dd7c2ff9556dad607f845501ab58b4bc936ee208e364024f656e9f4f7e02c5d3d39cf146215fb8
data/README.md CHANGED
@@ -14,9 +14,9 @@ This client library is a Ruby gem which can be compiled and used in your Ruby an
14
14
 
15
15
  1. Open the command line interface or the terminal and navigate to the folder containing the source code.
16
16
  2. Run ``` gem build gonebusy.gemspec ``` to build the gem.
17
- 3. Once built, the gem can be installed on the current work environment using ``` gem install gonebusy-0.0.2.gem ```
17
+ 3. Once built, the gem can be installed on the current work environment using ``` gem install gonebusy-0.0.3.gem ```
18
18
 
19
- ![Building Gem](http://apidocs.io/illustration/ruby?step=buildSDK&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy-Ruby&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.2)
19
+ ![Building Gem](http://apidocs.io/illustration/ruby?step=buildSDK&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy-Ruby&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.3)
20
20
 
21
21
  ## How to Use
22
22
 
@@ -26,41 +26,41 @@ The following section explains how to use the Gonebusy Ruby Gem in a new Rails p
26
26
 
27
27
  Close any existing projects in RubyMine™ by selecting ``` File -> Close Project ```. Next, click on ``` Create New Project ``` to create a new project from scratch.
28
28
 
29
- ![Create a new project in RubyMine](http://apidocs.io/illustration/ruby?step=createNewProject0&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.2)
29
+ ![Create a new project in RubyMine](http://apidocs.io/illustration/ruby?step=createNewProject0&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.3)
30
30
 
31
31
  Next, provide ``` TestApp ``` as the project name, choose ``` Rails Application ``` as the project type, and click ``` OK ```.
32
32
 
33
- ![Create a new Rails Application in RubyMine - step 1](http://apidocs.io/illustration/ruby?step=createNewProject1&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.2)
33
+ ![Create a new Rails Application in RubyMine - step 1](http://apidocs.io/illustration/ruby?step=createNewProject1&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.3)
34
34
 
35
35
  In the next dialog make sure that correct *Ruby SDK* is being used (minimum 2.0.0) and click ``` OK ```.
36
36
 
37
- ![Create a new Rails Application in RubyMine - step 2](http://apidocs.io/illustration/ruby?step=createNewProject2&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.2)
37
+ ![Create a new Rails Application in RubyMine - step 2](http://apidocs.io/illustration/ruby?step=createNewProject2&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.3)
38
38
 
39
39
  This will create a new Rails Application project with an existing set of files and folder.
40
40
 
41
41
  ### 2. Add reference of the gem
42
42
 
43
- In order to use the Gonebusy gem in the new project we must add a gem reference. Locate the ```Gemfile``` in the *Project Explorer* window under the ``` TestApp ``` project node. The file contains references to all gems being used in the project. Here, add the reference to the library gem by adding the following line: ``` gem 'gonebusy', '~> 0.0.2' ```
43
+ In order to use the Gonebusy gem in the new project we must add a gem reference. Locate the ```Gemfile``` in the *Project Explorer* window under the ``` TestApp ``` project node. The file contains references to all gems being used in the project. Here, add the reference to the library gem by adding the following line: ``` gem 'gonebusy', '~> 0.0.3' ```
44
44
 
45
- ![Add references of the Gemfile](http://apidocs.io/illustration/ruby?step=addReference&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.2)
45
+ ![Add references of the Gemfile](http://apidocs.io/illustration/ruby?step=addReference&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.3)
46
46
 
47
47
  ### 3. Adding a new Rails Controller
48
48
 
49
49
  Once the ``` TestApp ``` project is created, a folder named ``` controllers ``` will be visible in the *Project Explorer* under the following path: ``` TestApp > app > controllers ```. Right click on this folder and select ``` New -> Run Rails Generator... ```.
50
50
 
51
- ![Run Rails Generator on Controllers Folder](http://apidocs.io/illustration/ruby?step=addCode0&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.2)
51
+ ![Run Rails Generator on Controllers Folder](http://apidocs.io/illustration/ruby?step=addCode0&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.3)
52
52
 
53
53
  Selecting the said option will popup a small window where the generator names are displayed. Here, select the ``` controller ``` template.
54
54
 
55
- ![Create a new Controller](http://apidocs.io/illustration/ruby?step=addCode1&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.2)
55
+ ![Create a new Controller](http://apidocs.io/illustration/ruby?step=addCode1&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.3)
56
56
 
57
57
  Next, a popup window will ask you for a Controller name and included Actions. For controller name provide ``` Hello ``` and include an action named ``` Index ``` and click ``` OK ```.
58
58
 
59
- ![Add a new Controller](http://apidocs.io/illustration/ruby?step=addCode2&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.2)
59
+ ![Add a new Controller](http://apidocs.io/illustration/ruby?step=addCode2&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.3)
60
60
 
61
61
  A new controller class anmed ``` HelloController ``` will be created in a file named ``` hello_controller.rb ``` containing a method named ``` Index ```. In this method, add code for initialization and a sample for its usage.
62
62
 
63
- ![Initialize the library](http://apidocs.io/illustration/ruby?step=addCode3&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.2)
63
+ ![Initialize the library](http://apidocs.io/illustration/ruby?step=addCode3&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.3)
64
64
 
65
65
  ## How to Test
66
66
 
@@ -91,7 +91,7 @@ client = Gonebusy::GonebusyClient.new(authorization)
91
91
 
92
92
  The added initlization code can be debugged by putting a breakpoint in the ``` Index ``` method and running the project in debug mode by selecting ``` Run -> Debug 'Development: TestApp' ```.
93
93
 
94
- ![Debug the TestApp](http://apidocs.io/illustration/ruby?step=addCode4&workspaceFolder=GoneBusy%2011-17-16-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.2&initLine=client%2520%253D%2520GonebusyClient.new%2528%2527authorization%2527%2529)
94
+ ![Debug the TestApp](http://apidocs.io/illustration/ruby?step=addCode4&workspaceFolder=GoneBusy%2011-17-16-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.3&initLine=client%2520%253D%2520GonebusyClient.new%2528%2527authorization%2527%2529)
95
95
 
96
96
  ## Class Reference
97
97
 
@@ -6,10 +6,14 @@ module Gonebusy
6
6
  # @return [String]
7
7
  attr_accessor :description
8
8
 
9
- # Duration in minutes of the Service
9
+ # Duration of the Service in minutes
10
10
  # @return [Integer]
11
11
  attr_accessor :duration
12
12
 
13
+ # Max duration of the Service in minutes
14
+ # @return [Integer]
15
+ attr_accessor :max_duration
16
+
13
17
  # Service Name
14
18
  # @return [String]
15
19
  attr_accessor :name
@@ -40,6 +44,7 @@ module Gonebusy
40
44
  @hash = {}
41
45
  @hash["description"] = "description"
42
46
  @hash["duration"] = "duration"
47
+ @hash["max_duration"] = "max_duration"
43
48
  @hash["name"] = "name"
44
49
  @hash["categories"] = "categories"
45
50
  @hash["price_model_id"] = "price_model_id"
@@ -52,6 +57,7 @@ module Gonebusy
52
57
 
53
58
  def initialize(description = nil,
54
59
  duration = nil,
60
+ max_duration = nil,
55
61
  name = nil,
56
62
  categories = nil,
57
63
  price_model_id = nil,
@@ -60,6 +66,7 @@ module Gonebusy
60
66
  user_id = nil)
61
67
  @description = description
62
68
  @duration = duration
69
+ @max_duration = max_duration
63
70
  @name = name
64
71
  @categories = categories
65
72
  @price_model_id = price_model_id
@@ -76,6 +83,7 @@ module Gonebusy
76
83
  # Extract variables from the hash
77
84
  description = hash["description"]
78
85
  duration = hash["duration"]
86
+ max_duration = hash["max_duration"]
79
87
  name = hash["name"]
80
88
  categories = hash["categories"]
81
89
  price_model_id = hash["price_model_id"]
@@ -86,6 +94,7 @@ module Gonebusy
86
94
  # Create object from extracted values
87
95
  CreateServiceBody.new(description,
88
96
  duration,
97
+ max_duration,
89
98
  name,
90
99
  categories,
91
100
  price_model_id,
@@ -10,10 +10,14 @@ module Gonebusy
10
10
  # @return [String]
11
11
  attr_accessor :description
12
12
 
13
- # length in minutes of Service
13
+ # length of Service in minutes
14
14
  # @return [Integer]
15
15
  attr_accessor :duration
16
16
 
17
+ # max length of Service in minutes
18
+ # @return [Integer]
19
+ attr_accessor :max_duration
20
+
17
21
  # id of Service
18
22
  # @return [Integer]
19
23
  attr_accessor :id
@@ -49,6 +53,7 @@ module Gonebusy
49
53
  @hash["categories"] = "categories"
50
54
  @hash["description"] = "description"
51
55
  @hash["duration"] = "duration"
56
+ @hash["max_duration"] = "max_duration"
52
57
  @hash["id"] = "id"
53
58
  @hash["is_active"] = "is_active"
54
59
  @hash["name"] = "name"
@@ -63,6 +68,7 @@ module Gonebusy
63
68
  def initialize(categories = nil,
64
69
  description = nil,
65
70
  duration = nil,
71
+ max_duration = nil,
66
72
  id = nil,
67
73
  is_active = nil,
68
74
  name = nil,
@@ -73,6 +79,7 @@ module Gonebusy
73
79
  @categories = categories
74
80
  @description = description
75
81
  @duration = duration
82
+ @max_duration = max_duration
76
83
  @id = id
77
84
  @is_active = is_active
78
85
  @name = name
@@ -91,6 +98,7 @@ module Gonebusy
91
98
  categories = hash["categories"]
92
99
  description = hash["description"]
93
100
  duration = hash["duration"]
101
+ max_duration = hash["max_duration"]
94
102
  id = hash["id"]
95
103
  is_active = hash["is_active"]
96
104
  name = hash["name"]
@@ -103,6 +111,7 @@ module Gonebusy
103
111
  EntitiesServiceResponse.new(categories,
104
112
  description,
105
113
  duration,
114
+ max_duration,
106
115
  id,
107
116
  is_active,
108
117
  name,
@@ -10,10 +10,14 @@ module Gonebusy
10
10
  # @return [String]
11
11
  attr_accessor :description
12
12
 
13
- # Duration in minutes of the Service
13
+ # Duration of the Service in minutes
14
14
  # @return [Integer]
15
15
  attr_accessor :duration
16
16
 
17
+ # Max duration of the Service in minutes
18
+ # @return [Integer]
19
+ attr_accessor :max_duration
20
+
17
21
  # Service Name
18
22
  # @return [String]
19
23
  attr_accessor :name
@@ -37,6 +41,7 @@ module Gonebusy
37
41
  @hash["categories"] = "categories"
38
42
  @hash["description"] = "description"
39
43
  @hash["duration"] = "duration"
44
+ @hash["max_duration"] = "max_duration"
40
45
  @hash["name"] = "name"
41
46
  @hash["price_model_id"] = "price_model_id"
42
47
  @hash["resources"] = "resources"
@@ -48,6 +53,7 @@ module Gonebusy
48
53
  def initialize(categories = nil,
49
54
  description = nil,
50
55
  duration = nil,
56
+ max_duration = nil,
51
57
  name = nil,
52
58
  price_model_id = nil,
53
59
  resources = nil,
@@ -55,6 +61,7 @@ module Gonebusy
55
61
  @categories = categories
56
62
  @description = description
57
63
  @duration = duration
64
+ @max_duration = max_duration
58
65
  @name = name
59
66
  @price_model_id = price_model_id
60
67
  @resources = resources
@@ -70,6 +77,7 @@ module Gonebusy
70
77
  categories = hash["categories"]
71
78
  description = hash["description"]
72
79
  duration = hash["duration"]
80
+ max_duration = hash["max_duration"]
73
81
  name = hash["name"]
74
82
  price_model_id = hash["price_model_id"]
75
83
  resources = hash["resources"]
@@ -79,6 +87,7 @@ module Gonebusy
79
87
  UpdateServiceByIdBody.new(categories,
80
88
  description,
81
89
  duration,
90
+ max_duration,
82
91
  name,
83
92
  price_model_id,
84
93
  resources,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gonebusy-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Agranov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-18 00:00:00.000000000 Z
11
+ date: 2017-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday