gonebusy-ruby-client 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +29 -68
  3. data/lib/gonebusy/api_helper.rb +181 -149
  4. data/lib/gonebusy/configuration.rb +51 -16
  5. data/lib/gonebusy/controllers/base_controller.rb +46 -45
  6. data/lib/gonebusy/controllers/bookings_controller.rb +257 -293
  7. data/lib/gonebusy/controllers/categories_controller.rb +151 -180
  8. data/lib/gonebusy/controllers/pricing_models_controller.rb +202 -241
  9. data/lib/gonebusy/controllers/resources_controller.rb +295 -355
  10. data/lib/gonebusy/controllers/schedules_controller.rb +361 -428
  11. data/lib/gonebusy/controllers/search_controller.rb +52 -63
  12. data/lib/gonebusy/controllers/services_controller.rb +310 -367
  13. data/lib/gonebusy/controllers/users_controller.rb +199 -239
  14. data/lib/gonebusy/exceptions/api_exception.rb +16 -16
  15. data/lib/gonebusy/exceptions/entities_error_error_exception.rb +27 -0
  16. data/lib/gonebusy/exceptions/entities_error_exception.rb +26 -26
  17. data/lib/gonebusy/gonebusy_client.rb +58 -58
  18. data/lib/gonebusy/http/auth/custom_auth.rb +15 -15
  19. data/lib/gonebusy/http/faraday_client.rb +43 -41
  20. data/lib/gonebusy/http/http_call_back.rb +17 -17
  21. data/lib/gonebusy/http/http_client.rb +84 -82
  22. data/lib/gonebusy/http/http_context.rb +15 -15
  23. data/lib/gonebusy/http/http_method_enum.rb +7 -7
  24. data/lib/gonebusy/http/http_request.rb +44 -44
  25. data/lib/gonebusy/http/http_response.rb +19 -19
  26. data/lib/gonebusy/models/base_model.rb +31 -31
  27. data/lib/gonebusy/models/cancel_booking_by_id_response.rb +35 -35
  28. data/lib/gonebusy/models/create_booking_body.rb +134 -80
  29. data/lib/gonebusy/models/create_booking_response.rb +35 -35
  30. data/lib/gonebusy/models/create_category_body.rb +71 -71
  31. data/lib/gonebusy/models/create_category_response.rb +35 -35
  32. data/lib/gonebusy/models/create_pricing_model_body.rb +80 -80
  33. data/lib/gonebusy/models/create_pricing_model_response.rb +35 -35
  34. data/lib/gonebusy/models/create_resource_body.rb +89 -89
  35. data/lib/gonebusy/models/create_resource_response.rb +35 -35
  36. data/lib/gonebusy/models/create_schedule_body.rb +143 -144
  37. data/lib/gonebusy/models/create_schedule_response.rb +35 -35
  38. data/lib/gonebusy/models/create_schedule_time_window_body.rb +116 -117
  39. data/lib/gonebusy/models/create_schedule_time_window_response.rb +35 -35
  40. data/lib/gonebusy/models/create_service_body.rb +107 -107
  41. data/lib/gonebusy/models/create_service_response.rb +35 -35
  42. data/lib/gonebusy/models/create_user_body.rb +89 -89
  43. data/lib/gonebusy/models/create_user_response.rb +35 -35
  44. data/lib/gonebusy/models/date_recurs_by_enum.rb +12 -12
  45. data/lib/gonebusy/models/delete_resource_by_id_response.rb +35 -35
  46. data/lib/gonebusy/models/delete_schedule_by_id_response.rb +35 -35
  47. data/lib/gonebusy/models/delete_schedule_time_window_by_id_response.rb +35 -35
  48. data/lib/gonebusy/models/delete_service_by_id_response.rb +35 -35
  49. data/lib/gonebusy/models/entities_address_entity.rb +116 -116
  50. data/lib/gonebusy/models/entities_availability_response.rb +58 -58
  51. data/lib/gonebusy/models/entities_booking_response.rb +71 -71
  52. data/lib/gonebusy/models/entities_category_response.rb +98 -98
  53. data/lib/gonebusy/models/entities_pricing_model_response.rb +89 -89
  54. data/lib/gonebusy/models/entities_resource_availabilities.rb +49 -49
  55. data/lib/gonebusy/models/entities_resource_response.rb +107 -107
  56. data/lib/gonebusy/models/entities_schedule_response.rb +76 -76
  57. data/lib/gonebusy/models/entities_search_response.rb +54 -54
  58. data/lib/gonebusy/models/entities_service_response.rb +134 -130
  59. data/lib/gonebusy/models/entities_slots.rb +44 -45
  60. data/lib/gonebusy/models/entities_thing_type_response.rb +44 -44
  61. data/lib/gonebusy/models/entities_time_window_response.rb +134 -135
  62. data/lib/gonebusy/models/entities_user_response.rb +152 -152
  63. data/lib/gonebusy/models/frequency_enum.rb +17 -17
  64. data/lib/gonebusy/models/gender_enum.rb +9 -9
  65. data/lib/gonebusy/models/get_booking_by_id_response.rb +35 -35
  66. data/lib/gonebusy/models/get_bookings_response.rb +40 -40
  67. data/lib/gonebusy/models/get_categories_response.rb +40 -40
  68. data/lib/gonebusy/models/get_category_by_id_response.rb +35 -35
  69. data/lib/gonebusy/models/get_pricing_model_by_id_response.rb +35 -35
  70. data/lib/gonebusy/models/get_pricing_models_response.rb +40 -40
  71. data/lib/gonebusy/models/get_resource_by_id_response.rb +35 -35
  72. data/lib/gonebusy/models/get_resource_things_response.rb +40 -40
  73. data/lib/gonebusy/models/get_resources_response.rb +40 -40
  74. data/lib/gonebusy/models/get_schedule_by_id_response.rb +35 -35
  75. data/lib/gonebusy/models/get_schedules_response.rb +40 -40
  76. data/lib/gonebusy/models/get_service_available_slots_by_id_response.rb +35 -35
  77. data/lib/gonebusy/models/get_service_by_id_response.rb +35 -35
  78. data/lib/gonebusy/models/get_services_response.rb +40 -40
  79. data/lib/gonebusy/models/get_user_by_id_response.rb +35 -35
  80. data/lib/gonebusy/models/get_users_response.rb +40 -40
  81. data/lib/gonebusy/models/occurrence_enum.rb +21 -21
  82. data/lib/gonebusy/models/recurs_by_enum.rb +15 -15
  83. data/lib/gonebusy/models/search_query_response.rb +35 -35
  84. data/lib/gonebusy/models/update_booking_by_id_body.rb +116 -0
  85. data/lib/gonebusy/models/update_booking_by_id_response.rb +35 -35
  86. data/lib/gonebusy/models/update_pricing_model_by_id_body.rb +62 -62
  87. data/lib/gonebusy/models/update_pricing_model_by_id_response.rb +35 -35
  88. data/lib/gonebusy/models/update_resource_by_id_body.rb +71 -71
  89. data/lib/gonebusy/models/update_resource_by_id_response.rb +35 -35
  90. data/lib/gonebusy/models/update_schedule_time_window_by_id_body.rb +116 -117
  91. data/lib/gonebusy/models/update_schedule_time_window_by_id_response.rb +35 -35
  92. data/lib/gonebusy/models/update_service_by_id_body.rb +98 -98
  93. data/lib/gonebusy/models/update_service_by_id_response.rb +35 -35
  94. data/lib/gonebusy/models/update_user_by_id_body.rb +89 -89
  95. data/lib/gonebusy/models/update_user_by_id_response.rb +35 -35
  96. data/lib/gonebusy.rb +108 -104
  97. metadata +53 -17
@@ -1,35 +1,35 @@
1
- # This file was automatically generated for GoneBusy Inc. by APIMATIC v2.0 ( https://apimatic.io ).
2
-
3
- module Gonebusy
4
- class UpdateResourceByIdResponse < BaseModel
5
- # TODO: Write general description for this method
6
- # @return [EntitiesResourceResponse]
7
- attr_accessor :resource
8
-
9
- # A mapping from model property names to API property names
10
- def self.names
11
- if @hash.nil?
12
- @hash = {}
13
- @hash["resource"] = "resource"
14
- end
15
- @hash
16
- end
17
-
18
- def initialize(resource = nil)
19
- @resource = resource
20
- end
21
-
22
- # Creates an instance of the object from a hash
23
- def self.from_hash(hash)
24
- if hash == nil
25
- nil
26
- else
27
- # Extract variables from the hash
28
- resource = EntitiesResourceResponse.from_hash(hash["resource"]) if hash["resource"]
29
-
30
- # Create object from extracted values
31
- UpdateResourceByIdResponse.new(resource)
32
- end
33
- end
34
- end
35
- end
1
+ # This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
2
+
3
+ module Gonebusy
4
+ class UpdateResourceByIdResponse < BaseModel
5
+ # TODO: Write general description for this method
6
+ # @return [EntitiesResourceResponse]
7
+ attr_accessor :resource
8
+
9
+ # A mapping from model property names to API property names
10
+ def self.names
11
+ if @hash.nil?
12
+ @hash = {}
13
+ @hash["resource"] = "resource"
14
+ end
15
+ @hash
16
+ end
17
+
18
+ def initialize(resource = nil)
19
+ @resource = resource
20
+ end
21
+
22
+ # Creates an instance of the object from a hash
23
+ def self.from_hash(hash)
24
+ if hash == nil
25
+ nil
26
+ else
27
+ # Extract variables from the hash
28
+ resource = EntitiesResourceResponse.from_hash(hash['resource']) if hash['resource']
29
+
30
+ # Create object from extracted values
31
+ UpdateResourceByIdResponse.new(resource)
32
+ end
33
+ end
34
+ end
35
+ end
@@ -1,117 +1,116 @@
1
- # This file was automatically generated for GoneBusy Inc. by APIMATIC v2.0 ( https://apimatic.io ).
2
-
3
- require 'date'
4
- module Gonebusy
5
- class UpdateScheduleTimeWindowByIdBody < BaseModel
6
- # Required only when :recurs_by is 'monthly' or 'yearly' to differentiate between exact date or 'day in month/year'. See Schedule examples.
7
- # @return [DateRecursByEnum]
8
- attr_accessor :date_recurs_by
9
-
10
- # List of comma-separated days of the week this window of time falls on. If provided, at least one must be specified.
11
- # @return [String]
12
- attr_accessor :days
13
-
14
- # End Date of TimeWindow, leave blank for infinitely available. Several formats are supported: '2014-10-31', 'October 31, 2014'.
15
- # @return [DateTime]
16
- attr_accessor :end_date
17
-
18
- # End Time of first TimeWindow. Several formats are supported: '5pm', '17:00', '1700'
19
- # @return [String]
20
- attr_accessor :end_time
21
-
22
- # Optional frequency of recurrence as specified by :recurs_by. E.g, :single, :every, :every_other, etc. If not provided, assumed to be :every
23
- # @return [FrequencyEnum]
24
- attr_accessor :frequency
25
-
26
- # Optional occurrence of frequency. E.g, :first, :2nd, :last, :2nd_to_last, etc. If not provided, assumed to be :every. See Schedule examples.
27
- # @return [OccurrenceEnum]
28
- attr_accessor :occurrence
29
-
30
- # One of the possible recurrence values
31
- # @return [RecursByEnum]
32
- attr_accessor :recurs_by
33
-
34
- # Start Date of TimeWindow. Several formats are supported: '2014-10-31', 'October 31, 2014'.
35
- # @return [DateTime]
36
- attr_accessor :start_date
37
-
38
- # Start Time of first TimeWindow. Several formats are supported: '9am', '09:00', '9:00', '0900'
39
- # @return [String]
40
- attr_accessor :start_time
41
-
42
- # Optional total number of minutes in TimeWindow. Useful when duration of window is greater than 24 hours.
43
- # @return [Integer]
44
- attr_accessor :total_minutes
45
-
46
- # A mapping from model property names to API property names
47
- def self.names
48
- if @hash.nil?
49
- @hash = {}
50
- @hash["date_recurs_by"] = "date_recurs_by"
51
- @hash["days"] = "days"
52
- @hash["end_date"] = "end_date"
53
- @hash["end_time"] = "end_time"
54
- @hash["frequency"] = "frequency"
55
- @hash["occurrence"] = "occurrence"
56
- @hash["recurs_by"] = "recurs_by"
57
- @hash["start_date"] = "start_date"
58
- @hash["start_time"] = "start_time"
59
- @hash["total_minutes"] = "total_minutes"
60
- end
61
- @hash
62
- end
63
-
64
- def initialize(date_recurs_by = nil,
65
- days = nil,
66
- end_date = nil,
67
- end_time = nil,
68
- frequency = nil,
69
- occurrence = nil,
70
- recurs_by = nil,
71
- start_date = nil,
72
- start_time = nil,
73
- total_minutes = nil)
74
- @date_recurs_by = date_recurs_by
75
- @days = days
76
- @end_date = end_date
77
- @end_time = end_time
78
- @frequency = frequency
79
- @occurrence = occurrence
80
- @recurs_by = recurs_by
81
- @start_date = start_date
82
- @start_time = start_time
83
- @total_minutes = total_minutes
84
- end
85
-
86
- # Creates an instance of the object from a hash
87
- def self.from_hash(hash)
88
- if hash == nil
89
- nil
90
- else
91
- # Extract variables from the hash
92
- date_recurs_by = hash["date_recurs_by"]
93
- days = hash["days"]
94
- end_date = DateTime.iso8601(hash["end_date"]) if hash["end_date"]
95
- end_time = hash["end_time"]
96
- frequency = hash["frequency"]
97
- occurrence = hash["occurrence"]
98
- recurs_by = hash["recurs_by"]
99
- start_date = DateTime.iso8601(hash["start_date"]) if hash["start_date"]
100
- start_time = hash["start_time"]
101
- total_minutes = hash["total_minutes"]
102
-
103
- # Create object from extracted values
104
- UpdateScheduleTimeWindowByIdBody.new(date_recurs_by,
105
- days,
106
- end_date,
107
- end_time,
108
- frequency,
109
- occurrence,
110
- recurs_by,
111
- start_date,
112
- start_time,
113
- total_minutes)
114
- end
115
- end
116
- end
117
- end
1
+ # This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
2
+
3
+ module Gonebusy
4
+ class UpdateScheduleTimeWindowByIdBody < BaseModel
5
+ # Required only when :recurs_by is 'monthly' or 'yearly' to differentiate between exact date or 'day in month/year'. See Schedule examples.
6
+ # @return [DateRecursByEnum]
7
+ attr_accessor :date_recurs_by
8
+
9
+ # List of comma-separated days of the week this window of time falls on. If provided, at least one must be specified.
10
+ # @return [String]
11
+ attr_accessor :days
12
+
13
+ # End Date of TimeWindow, leave blank for infinitely available. Several formats are supported: '2014-10-31', 'October 31, 2014'.
14
+ # @return [Date]
15
+ attr_accessor :end_date
16
+
17
+ # End Time of first TimeWindow. Several formats are supported: '5pm', '17:00', '1700'
18
+ # @return [String]
19
+ attr_accessor :end_time
20
+
21
+ # Optional frequency of recurrence as specified by :recurs_by. E.g, :single, :every, :every_other, etc. If not provided, assumed to be :every
22
+ # @return [FrequencyEnum]
23
+ attr_accessor :frequency
24
+
25
+ # Optional occurrence of frequency. E.g, :first, :2nd, :last, :2nd_to_last, etc. If not provided, assumed to be :every. See Schedule examples.
26
+ # @return [OccurrenceEnum]
27
+ attr_accessor :occurrence
28
+
29
+ # One of the possible recurrence values
30
+ # @return [RecursByEnum]
31
+ attr_accessor :recurs_by
32
+
33
+ # Start Date of TimeWindow. Several formats are supported: '2014-10-31', 'October 31, 2014'.
34
+ # @return [Date]
35
+ attr_accessor :start_date
36
+
37
+ # Start Time of first TimeWindow. Several formats are supported: '9am', '09:00', '9:00', '0900'
38
+ # @return [String]
39
+ attr_accessor :start_time
40
+
41
+ # Optional total number of minutes in TimeWindow. Useful when duration of window is greater than 24 hours.
42
+ # @return [Integer]
43
+ attr_accessor :total_minutes
44
+
45
+ # A mapping from model property names to API property names
46
+ def self.names
47
+ if @hash.nil?
48
+ @hash = {}
49
+ @hash["date_recurs_by"] = "date_recurs_by"
50
+ @hash["days"] = "days"
51
+ @hash["end_date"] = "end_date"
52
+ @hash["end_time"] = "end_time"
53
+ @hash["frequency"] = "frequency"
54
+ @hash["occurrence"] = "occurrence"
55
+ @hash["recurs_by"] = "recurs_by"
56
+ @hash["start_date"] = "start_date"
57
+ @hash["start_time"] = "start_time"
58
+ @hash["total_minutes"] = "total_minutes"
59
+ end
60
+ @hash
61
+ end
62
+
63
+ def initialize(date_recurs_by = nil,
64
+ days = nil,
65
+ end_date = nil,
66
+ end_time = nil,
67
+ frequency = nil,
68
+ occurrence = nil,
69
+ recurs_by = nil,
70
+ start_date = nil,
71
+ start_time = nil,
72
+ total_minutes = nil)
73
+ @date_recurs_by = date_recurs_by
74
+ @days = days
75
+ @end_date = end_date
76
+ @end_time = end_time
77
+ @frequency = frequency
78
+ @occurrence = occurrence
79
+ @recurs_by = recurs_by
80
+ @start_date = start_date
81
+ @start_time = start_time
82
+ @total_minutes = total_minutes
83
+ end
84
+
85
+ # Creates an instance of the object from a hash
86
+ def self.from_hash(hash)
87
+ if hash == nil
88
+ nil
89
+ else
90
+ # Extract variables from the hash
91
+ date_recurs_by = hash['date_recurs_by']
92
+ days = hash['days']
93
+ end_date = hash['end_date']
94
+ end_time = hash['end_time']
95
+ frequency = hash['frequency']
96
+ occurrence = hash['occurrence']
97
+ recurs_by = hash['recurs_by']
98
+ start_date = hash['start_date']
99
+ start_time = hash['start_time']
100
+ total_minutes = hash['total_minutes']
101
+
102
+ # Create object from extracted values
103
+ UpdateScheduleTimeWindowByIdBody.new(date_recurs_by,
104
+ days,
105
+ end_date,
106
+ end_time,
107
+ frequency,
108
+ occurrence,
109
+ recurs_by,
110
+ start_date,
111
+ start_time,
112
+ total_minutes)
113
+ end
114
+ end
115
+ end
116
+ end
@@ -1,35 +1,35 @@
1
- # This file was automatically generated for GoneBusy Inc. by APIMATIC v2.0 ( https://apimatic.io ).
2
-
3
- module Gonebusy
4
- class UpdateScheduleTimeWindowByIdResponse < BaseModel
5
- # TODO: Write general description for this method
6
- # @return [EntitiesScheduleResponse]
7
- attr_accessor :schedule
8
-
9
- # A mapping from model property names to API property names
10
- def self.names
11
- if @hash.nil?
12
- @hash = {}
13
- @hash["schedule"] = "schedule"
14
- end
15
- @hash
16
- end
17
-
18
- def initialize(schedule = nil)
19
- @schedule = schedule
20
- end
21
-
22
- # Creates an instance of the object from a hash
23
- def self.from_hash(hash)
24
- if hash == nil
25
- nil
26
- else
27
- # Extract variables from the hash
28
- schedule = EntitiesScheduleResponse.from_hash(hash["schedule"]) if hash["schedule"]
29
-
30
- # Create object from extracted values
31
- UpdateScheduleTimeWindowByIdResponse.new(schedule)
32
- end
33
- end
34
- end
35
- end
1
+ # This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
2
+
3
+ module Gonebusy
4
+ class UpdateScheduleTimeWindowByIdResponse < BaseModel
5
+ # TODO: Write general description for this method
6
+ # @return [EntitiesScheduleResponse]
7
+ attr_accessor :schedule
8
+
9
+ # A mapping from model property names to API property names
10
+ def self.names
11
+ if @hash.nil?
12
+ @hash = {}
13
+ @hash["schedule"] = "schedule"
14
+ end
15
+ @hash
16
+ end
17
+
18
+ def initialize(schedule = nil)
19
+ @schedule = schedule
20
+ end
21
+
22
+ # Creates an instance of the object from a hash
23
+ def self.from_hash(hash)
24
+ if hash == nil
25
+ nil
26
+ else
27
+ # Extract variables from the hash
28
+ schedule = EntitiesScheduleResponse.from_hash(hash['schedule']) if hash['schedule']
29
+
30
+ # Create object from extracted values
31
+ UpdateScheduleTimeWindowByIdResponse.new(schedule)
32
+ end
33
+ end
34
+ end
35
+ end
@@ -1,98 +1,98 @@
1
- # This file was automatically generated for GoneBusy Inc. by APIMATIC v2.0 ( https://apimatic.io ).
2
-
3
- module Gonebusy
4
- class UpdateServiceByIdBody < BaseModel
5
- # Optional List of comma-separated Category IDs to associate with Service
6
- # @return [String]
7
- attr_accessor :categories
8
-
9
- # Service Description
10
- # @return [String]
11
- attr_accessor :description
12
-
13
- # Duration of the Service in minutes
14
- # @return [Integer]
15
- attr_accessor :duration
16
-
17
- # Max duration of the Service in minutes
18
- # @return [Integer]
19
- attr_accessor :max_duration
20
-
21
- # Service Name
22
- # @return [String]
23
- attr_accessor :name
24
-
25
- # Optional Price Model Id
26
- # @return [Integer]
27
- attr_accessor :price_model_id
28
-
29
- # Optional List of comma-separated Resource IDs that will provide this Service, default: API user's resource id
30
- # @return [String]
31
- attr_accessor :resources
32
-
33
- # Optional abbreviated Service name
34
- # @return [String]
35
- attr_accessor :short_name
36
-
37
- # A mapping from model property names to API property names
38
- def self.names
39
- if @hash.nil?
40
- @hash = {}
41
- @hash["categories"] = "categories"
42
- @hash["description"] = "description"
43
- @hash["duration"] = "duration"
44
- @hash["max_duration"] = "max_duration"
45
- @hash["name"] = "name"
46
- @hash["price_model_id"] = "price_model_id"
47
- @hash["resources"] = "resources"
48
- @hash["short_name"] = "short_name"
49
- end
50
- @hash
51
- end
52
-
53
- def initialize(categories = nil,
54
- description = nil,
55
- duration = nil,
56
- max_duration = nil,
57
- name = nil,
58
- price_model_id = nil,
59
- resources = nil,
60
- short_name = nil)
61
- @categories = categories
62
- @description = description
63
- @duration = duration
64
- @max_duration = max_duration
65
- @name = name
66
- @price_model_id = price_model_id
67
- @resources = resources
68
- @short_name = short_name
69
- end
70
-
71
- # Creates an instance of the object from a hash
72
- def self.from_hash(hash)
73
- if hash == nil
74
- nil
75
- else
76
- # Extract variables from the hash
77
- categories = hash["categories"]
78
- description = hash["description"]
79
- duration = hash["duration"]
80
- max_duration = hash["max_duration"]
81
- name = hash["name"]
82
- price_model_id = hash["price_model_id"]
83
- resources = hash["resources"]
84
- short_name = hash["short_name"]
85
-
86
- # Create object from extracted values
87
- UpdateServiceByIdBody.new(categories,
88
- description,
89
- duration,
90
- max_duration,
91
- name,
92
- price_model_id,
93
- resources,
94
- short_name)
95
- end
96
- end
97
- end
98
- end
1
+ # This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
2
+
3
+ module Gonebusy
4
+ class UpdateServiceByIdBody < BaseModel
5
+ # Optional List of comma-separated Category IDs to associate with Service
6
+ # @return [String]
7
+ attr_accessor :categories
8
+
9
+ # Service Description
10
+ # @return [String]
11
+ attr_accessor :description
12
+
13
+ # Duration in minutes of the Service
14
+ # @return [Integer]
15
+ attr_accessor :duration
16
+
17
+ # Max duration of the Service in minutes
18
+ # @return [Integer]
19
+ attr_accessor :max_duration
20
+
21
+ # Service Name
22
+ # @return [String]
23
+ attr_accessor :name
24
+
25
+ # Optional Price Model Id
26
+ # @return [Integer]
27
+ attr_accessor :price_model_id
28
+
29
+ # Optional List of comma-separated Resource IDs that will provide this Service, default: API user's resource id
30
+ # @return [String]
31
+ attr_accessor :resources
32
+
33
+ # Optional abbreviated Service name
34
+ # @return [String]
35
+ attr_accessor :short_name
36
+
37
+ # A mapping from model property names to API property names
38
+ def self.names
39
+ if @hash.nil?
40
+ @hash = {}
41
+ @hash["categories"] = "categories"
42
+ @hash["description"] = "description"
43
+ @hash["duration"] = "duration"
44
+ @hash["max_duration"] = "max_duration"
45
+ @hash["name"] = "name"
46
+ @hash["price_model_id"] = "price_model_id"
47
+ @hash["resources"] = "resources"
48
+ @hash["short_name"] = "short_name"
49
+ end
50
+ @hash
51
+ end
52
+
53
+ def initialize(categories = nil,
54
+ description = nil,
55
+ duration = nil,
56
+ max_duration = nil,
57
+ name = nil,
58
+ price_model_id = nil,
59
+ resources = nil,
60
+ short_name = nil)
61
+ @categories = categories
62
+ @description = description
63
+ @duration = duration
64
+ @max_duration = max_duration
65
+ @name = name
66
+ @price_model_id = price_model_id
67
+ @resources = resources
68
+ @short_name = short_name
69
+ end
70
+
71
+ # Creates an instance of the object from a hash
72
+ def self.from_hash(hash)
73
+ if hash == nil
74
+ nil
75
+ else
76
+ # Extract variables from the hash
77
+ categories = hash['categories']
78
+ description = hash['description']
79
+ duration = hash['duration']
80
+ max_duration = hash['max_duration']
81
+ name = hash['name']
82
+ price_model_id = hash['price_model_id']
83
+ resources = hash['resources']
84
+ short_name = hash['short_name']
85
+
86
+ # Create object from extracted values
87
+ UpdateServiceByIdBody.new(categories,
88
+ description,
89
+ duration,
90
+ max_duration,
91
+ name,
92
+ price_model_id,
93
+ resources,
94
+ short_name)
95
+ end
96
+ end
97
+ end
98
+ end