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,44 +1,44 @@
1
- # This file was automatically generated for GoneBusy Inc. by APIMATIC v2.0 ( https://apimatic.io ).
2
-
3
- module Gonebusy
4
- class EntitiesThingTypeResponse < BaseModel
5
- # id of Category
6
- # @return [Integer]
7
- attr_accessor :id
8
-
9
- # name of Category
10
- # @return [String]
11
- attr_accessor :name
12
-
13
- # A mapping from model property names to API property names
14
- def self.names
15
- if @hash.nil?
16
- @hash = {}
17
- @hash["id"] = "id"
18
- @hash["name"] = "name"
19
- end
20
- @hash
21
- end
22
-
23
- def initialize(id = nil,
24
- name = nil)
25
- @id = id
26
- @name = name
27
- end
28
-
29
- # Creates an instance of the object from a hash
30
- def self.from_hash(hash)
31
- if hash == nil
32
- nil
33
- else
34
- # Extract variables from the hash
35
- id = hash["id"]
36
- name = hash["name"]
37
-
38
- # Create object from extracted values
39
- EntitiesThingTypeResponse.new(id,
40
- name)
41
- end
42
- end
43
- end
44
- end
1
+ # This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
2
+
3
+ module Gonebusy
4
+ class EntitiesThingTypeResponse < BaseModel
5
+ # id of Category
6
+ # @return [Integer]
7
+ attr_accessor :id
8
+
9
+ # name of Category
10
+ # @return [String]
11
+ attr_accessor :name
12
+
13
+ # A mapping from model property names to API property names
14
+ def self.names
15
+ if @hash.nil?
16
+ @hash = {}
17
+ @hash["id"] = "id"
18
+ @hash["name"] = "name"
19
+ end
20
+ @hash
21
+ end
22
+
23
+ def initialize(id = nil,
24
+ name = nil)
25
+ @id = id
26
+ @name = name
27
+ end
28
+
29
+ # Creates an instance of the object from a hash
30
+ def self.from_hash(hash)
31
+ if hash == nil
32
+ nil
33
+ else
34
+ # Extract variables from the hash
35
+ id = hash['id']
36
+ name = hash['name']
37
+
38
+ # Create object from extracted values
39
+ EntitiesThingTypeResponse.new(id,
40
+ name)
41
+ end
42
+ end
43
+ end
44
+ end
@@ -1,135 +1,134 @@
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 EntitiesTimeWindowResponse < BaseModel
6
- # date_recurs_by
7
- # @return [String]
8
- attr_accessor :date_recurs_by
9
-
10
- # array of days of week TimeWindow falls on
11
- # @return [List of String]
12
- attr_accessor :days
13
-
14
- # end date
15
- # @return [DateTime]
16
- attr_accessor :end_date
17
-
18
- # end time
19
- # @return [String]
20
- attr_accessor :end_time
21
-
22
- # frequency
23
- # @return [String]
24
- attr_accessor :frequency
25
-
26
- # id of TimeWindow
27
- # @return [Integer]
28
- attr_accessor :id
29
-
30
- # true is available, false is unavailable
31
- # @return [Boolean]
32
- attr_accessor :negation
33
-
34
- # occurrence
35
- # @return [String]
36
- attr_accessor :occurrence
37
-
38
- # recurs by
39
- # @return [String]
40
- attr_accessor :recurs_by
41
-
42
- # start date
43
- # @return [DateTime]
44
- attr_accessor :start_date
45
-
46
- # start time
47
- # @return [String]
48
- attr_accessor :start_time
49
-
50
- # total minutes spanned
51
- # @return [Integer]
52
- attr_accessor :total_minutes
53
-
54
- # A mapping from model property names to API property names
55
- def self.names
56
- if @hash.nil?
57
- @hash = {}
58
- @hash["date_recurs_by"] = "date_recurs_by"
59
- @hash["days"] = "days"
60
- @hash["end_date"] = "end_date"
61
- @hash["end_time"] = "end_time"
62
- @hash["frequency"] = "frequency"
63
- @hash["id"] = "id"
64
- @hash["negation"] = "negation"
65
- @hash["occurrence"] = "occurrence"
66
- @hash["recurs_by"] = "recurs_by"
67
- @hash["start_date"] = "start_date"
68
- @hash["start_time"] = "start_time"
69
- @hash["total_minutes"] = "total_minutes"
70
- end
71
- @hash
72
- end
73
-
74
- def initialize(date_recurs_by = nil,
75
- days = nil,
76
- end_date = nil,
77
- end_time = nil,
78
- frequency = nil,
79
- id = nil,
80
- negation = nil,
81
- occurrence = nil,
82
- recurs_by = nil,
83
- start_date = nil,
84
- start_time = nil,
85
- total_minutes = nil)
86
- @date_recurs_by = date_recurs_by
87
- @days = days
88
- @end_date = end_date
89
- @end_time = end_time
90
- @frequency = frequency
91
- @id = id
92
- @negation = negation
93
- @occurrence = occurrence
94
- @recurs_by = recurs_by
95
- @start_date = start_date
96
- @start_time = start_time
97
- @total_minutes = total_minutes
98
- end
99
-
100
- # Creates an instance of the object from a hash
101
- def self.from_hash(hash)
102
- if hash == nil
103
- nil
104
- else
105
- # Extract variables from the hash
106
- date_recurs_by = hash["date_recurs_by"]
107
- days = hash["days"]
108
- end_date = DateTime.iso8601(hash["end_date"]) if hash["end_date"]
109
- end_time = hash["end_time"]
110
- frequency = hash["frequency"]
111
- id = hash["id"]
112
- negation = hash["negation"]
113
- occurrence = hash["occurrence"]
114
- recurs_by = hash["recurs_by"]
115
- start_date = DateTime.iso8601(hash["start_date"]) if hash["start_date"]
116
- start_time = hash["start_time"]
117
- total_minutes = hash["total_minutes"]
118
-
119
- # Create object from extracted values
120
- EntitiesTimeWindowResponse.new(date_recurs_by,
121
- days,
122
- end_date,
123
- end_time,
124
- frequency,
125
- id,
126
- negation,
127
- occurrence,
128
- recurs_by,
129
- start_date,
130
- start_time,
131
- total_minutes)
132
- end
133
- end
134
- end
135
- end
1
+ # This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
2
+
3
+ module Gonebusy
4
+ class EntitiesTimeWindowResponse < BaseModel
5
+ # date_recurs_by
6
+ # @return [String]
7
+ attr_accessor :date_recurs_by
8
+
9
+ # array of days of week TimeWindow falls on
10
+ # @return [List of String]
11
+ attr_accessor :days
12
+
13
+ # end date
14
+ # @return [Date]
15
+ attr_accessor :end_date
16
+
17
+ # end time
18
+ # @return [String]
19
+ attr_accessor :end_time
20
+
21
+ # frequency
22
+ # @return [String]
23
+ attr_accessor :frequency
24
+
25
+ # id of TimeWindow
26
+ # @return [Integer]
27
+ attr_accessor :id
28
+
29
+ # occurrence
30
+ # @return [String]
31
+ attr_accessor :occurrence
32
+
33
+ # recurs by
34
+ # @return [String]
35
+ attr_accessor :recurs_by
36
+
37
+ # start date
38
+ # @return [Date]
39
+ attr_accessor :start_date
40
+
41
+ # start time
42
+ # @return [String]
43
+ attr_accessor :start_time
44
+
45
+ # total minutes spanned
46
+ # @return [Integer]
47
+ attr_accessor :total_minutes
48
+
49
+ # true is available, false is unavailable
50
+ # @return [Boolean]
51
+ attr_accessor :unavailable
52
+
53
+ # A mapping from model property names to API property names
54
+ def self.names
55
+ if @hash.nil?
56
+ @hash = {}
57
+ @hash["date_recurs_by"] = "date_recurs_by"
58
+ @hash["days"] = "days"
59
+ @hash["end_date"] = "end_date"
60
+ @hash["end_time"] = "end_time"
61
+ @hash["frequency"] = "frequency"
62
+ @hash["id"] = "id"
63
+ @hash["occurrence"] = "occurrence"
64
+ @hash["recurs_by"] = "recurs_by"
65
+ @hash["start_date"] = "start_date"
66
+ @hash["start_time"] = "start_time"
67
+ @hash["total_minutes"] = "total_minutes"
68
+ @hash["unavailable"] = "unavailable"
69
+ end
70
+ @hash
71
+ end
72
+
73
+ def initialize(date_recurs_by = nil,
74
+ days = nil,
75
+ end_date = nil,
76
+ end_time = nil,
77
+ frequency = nil,
78
+ id = nil,
79
+ occurrence = nil,
80
+ recurs_by = nil,
81
+ start_date = nil,
82
+ start_time = nil,
83
+ total_minutes = nil,
84
+ unavailable = nil)
85
+ @date_recurs_by = date_recurs_by
86
+ @days = days
87
+ @end_date = end_date
88
+ @end_time = end_time
89
+ @frequency = frequency
90
+ @id = id
91
+ @occurrence = occurrence
92
+ @recurs_by = recurs_by
93
+ @start_date = start_date
94
+ @start_time = start_time
95
+ @total_minutes = total_minutes
96
+ @unavailable = unavailable
97
+ end
98
+
99
+ # Creates an instance of the object from a hash
100
+ def self.from_hash(hash)
101
+ if hash == nil
102
+ nil
103
+ else
104
+ # Extract variables from the hash
105
+ date_recurs_by = hash['date_recurs_by']
106
+ days = hash['days']
107
+ end_date = hash['end_date']
108
+ end_time = hash['end_time']
109
+ frequency = hash['frequency']
110
+ id = hash['id']
111
+ occurrence = hash['occurrence']
112
+ recurs_by = hash['recurs_by']
113
+ start_date = hash['start_date']
114
+ start_time = hash['start_time']
115
+ total_minutes = hash['total_minutes']
116
+ unavailable = hash['unavailable']
117
+
118
+ # Create object from extracted values
119
+ EntitiesTimeWindowResponse.new(date_recurs_by,
120
+ days,
121
+ end_date,
122
+ end_time,
123
+ frequency,
124
+ id,
125
+ occurrence,
126
+ recurs_by,
127
+ start_date,
128
+ start_time,
129
+ total_minutes,
130
+ unavailable)
131
+ end
132
+ end
133
+ end
134
+ end
@@ -1,152 +1,152 @@
1
- # This file was automatically generated for GoneBusy Inc. by APIMATIC v2.0 ( https://apimatic.io ).
2
-
3
- module Gonebusy
4
- class EntitiesUserResponse < BaseModel
5
- # id of Account Manager user for User
6
- # @return [Integer]
7
- attr_accessor :account_manager_id
8
-
9
- # address of User
10
- # @return [EntitiesAddressEntity]
11
- attr_accessor :address
12
-
13
- # business name for User
14
- # @return [String]
15
- attr_accessor :business_name
16
-
17
- # status of user
18
- # @return [Boolean]
19
- attr_accessor :disabled
20
-
21
- # email of User
22
- # @return [String]
23
- attr_accessor :email
24
-
25
- # external url to business
26
- # @return [String]
27
- attr_accessor :external_url
28
-
29
- # first name of User
30
- # @return [String]
31
- attr_accessor :first_name
32
-
33
- # id of User
34
- # @return [Integer]
35
- attr_accessor :id
36
-
37
- # last name of User
38
- # @return [String]
39
- attr_accessor :last_name
40
-
41
- # permalink of User
42
- # @return [String]
43
- attr_accessor :permalink
44
-
45
- # phone number of User
46
- # @return [String]
47
- attr_accessor :phone
48
-
49
- # id of defacto Resource for User
50
- # @return [Integer]
51
- attr_accessor :resource_id
52
-
53
- # User account type
54
- # @return [String]
55
- attr_accessor :role
56
-
57
- # timezone of User,
58
- # @return [String]
59
- attr_accessor :timezone
60
-
61
- # A mapping from model property names to API property names
62
- def self.names
63
- if @hash.nil?
64
- @hash = {}
65
- @hash["account_manager_id"] = "account_manager_id"
66
- @hash["address"] = "address"
67
- @hash["business_name"] = "business_name"
68
- @hash["disabled"] = "disabled"
69
- @hash["email"] = "email"
70
- @hash["external_url"] = "external_url"
71
- @hash["first_name"] = "first_name"
72
- @hash["id"] = "id"
73
- @hash["last_name"] = "last_name"
74
- @hash["permalink"] = "permalink"
75
- @hash["phone"] = "phone"
76
- @hash["resource_id"] = "resource_id"
77
- @hash["role"] = "role"
78
- @hash["timezone"] = "timezone"
79
- end
80
- @hash
81
- end
82
-
83
- def initialize(account_manager_id = nil,
84
- address = nil,
85
- business_name = nil,
86
- disabled = nil,
87
- email = nil,
88
- external_url = nil,
89
- first_name = nil,
90
- id = nil,
91
- last_name = nil,
92
- permalink = nil,
93
- phone = nil,
94
- resource_id = nil,
95
- role = nil,
96
- timezone = nil)
97
- @account_manager_id = account_manager_id
98
- @address = address
99
- @business_name = business_name
100
- @disabled = disabled
101
- @email = email
102
- @external_url = external_url
103
- @first_name = first_name
104
- @id = id
105
- @last_name = last_name
106
- @permalink = permalink
107
- @phone = phone
108
- @resource_id = resource_id
109
- @role = role
110
- @timezone = timezone
111
- end
112
-
113
- # Creates an instance of the object from a hash
114
- def self.from_hash(hash)
115
- if hash == nil
116
- nil
117
- else
118
- # Extract variables from the hash
119
- account_manager_id = hash["account_manager_id"]
120
- address = EntitiesAddressEntity.from_hash(hash["address"]) if hash["address"]
121
- business_name = hash["business_name"]
122
- disabled = hash["disabled"]
123
- email = hash["email"]
124
- external_url = hash["external_url"]
125
- first_name = hash["first_name"]
126
- id = hash["id"]
127
- last_name = hash["last_name"]
128
- permalink = hash["permalink"]
129
- phone = hash["phone"]
130
- resource_id = hash["resource_id"]
131
- role = hash["role"]
132
- timezone = hash["timezone"]
133
-
134
- # Create object from extracted values
135
- EntitiesUserResponse.new(account_manager_id,
136
- address,
137
- business_name,
138
- disabled,
139
- email,
140
- external_url,
141
- first_name,
142
- id,
143
- last_name,
144
- permalink,
145
- phone,
146
- resource_id,
147
- role,
148
- timezone)
149
- end
150
- end
151
- end
152
- end
1
+ # This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
2
+
3
+ module Gonebusy
4
+ class EntitiesUserResponse < BaseModel
5
+ # id of Account Manager user for User
6
+ # @return [Integer]
7
+ attr_accessor :account_manager_id
8
+
9
+ # address of User
10
+ # @return [EntitiesAddressEntity]
11
+ attr_accessor :address
12
+
13
+ # business name for User
14
+ # @return [String]
15
+ attr_accessor :business_name
16
+
17
+ # status of user
18
+ # @return [Boolean]
19
+ attr_accessor :disabled
20
+
21
+ # email of User
22
+ # @return [String]
23
+ attr_accessor :email
24
+
25
+ # external url to business
26
+ # @return [String]
27
+ attr_accessor :external_url
28
+
29
+ # first name of User
30
+ # @return [String]
31
+ attr_accessor :first_name
32
+
33
+ # id of User
34
+ # @return [Integer]
35
+ attr_accessor :id
36
+
37
+ # last name of User
38
+ # @return [String]
39
+ attr_accessor :last_name
40
+
41
+ # permalink of User
42
+ # @return [String]
43
+ attr_accessor :permalink
44
+
45
+ # phone number of User
46
+ # @return [String]
47
+ attr_accessor :phone
48
+
49
+ # id of defacto Resource for User
50
+ # @return [Integer]
51
+ attr_accessor :resource_id
52
+
53
+ # User account type
54
+ # @return [String]
55
+ attr_accessor :role
56
+
57
+ # timezone of User,
58
+ # @return [String]
59
+ attr_accessor :timezone
60
+
61
+ # A mapping from model property names to API property names
62
+ def self.names
63
+ if @hash.nil?
64
+ @hash = {}
65
+ @hash["account_manager_id"] = "account_manager_id"
66
+ @hash["address"] = "address"
67
+ @hash["business_name"] = "business_name"
68
+ @hash["disabled"] = "disabled"
69
+ @hash["email"] = "email"
70
+ @hash["external_url"] = "external_url"
71
+ @hash["first_name"] = "first_name"
72
+ @hash["id"] = "id"
73
+ @hash["last_name"] = "last_name"
74
+ @hash["permalink"] = "permalink"
75
+ @hash["phone"] = "phone"
76
+ @hash["resource_id"] = "resource_id"
77
+ @hash["role"] = "role"
78
+ @hash["timezone"] = "timezone"
79
+ end
80
+ @hash
81
+ end
82
+
83
+ def initialize(account_manager_id = nil,
84
+ address = nil,
85
+ business_name = nil,
86
+ disabled = nil,
87
+ email = nil,
88
+ external_url = nil,
89
+ first_name = nil,
90
+ id = nil,
91
+ last_name = nil,
92
+ permalink = nil,
93
+ phone = nil,
94
+ resource_id = nil,
95
+ role = nil,
96
+ timezone = nil)
97
+ @account_manager_id = account_manager_id
98
+ @address = address
99
+ @business_name = business_name
100
+ @disabled = disabled
101
+ @email = email
102
+ @external_url = external_url
103
+ @first_name = first_name
104
+ @id = id
105
+ @last_name = last_name
106
+ @permalink = permalink
107
+ @phone = phone
108
+ @resource_id = resource_id
109
+ @role = role
110
+ @timezone = timezone
111
+ end
112
+
113
+ # Creates an instance of the object from a hash
114
+ def self.from_hash(hash)
115
+ if hash == nil
116
+ nil
117
+ else
118
+ # Extract variables from the hash
119
+ account_manager_id = hash['account_manager_id']
120
+ address = EntitiesAddressEntity.from_hash(hash['address']) if hash['address']
121
+ business_name = hash['business_name']
122
+ disabled = hash['disabled']
123
+ email = hash['email']
124
+ external_url = hash['external_url']
125
+ first_name = hash['first_name']
126
+ id = hash['id']
127
+ last_name = hash['last_name']
128
+ permalink = hash['permalink']
129
+ phone = hash['phone']
130
+ resource_id = hash['resource_id']
131
+ role = hash['role']
132
+ timezone = hash['timezone']
133
+
134
+ # Create object from extracted values
135
+ EntitiesUserResponse.new(account_manager_id,
136
+ address,
137
+ business_name,
138
+ disabled,
139
+ email,
140
+ external_url,
141
+ first_name,
142
+ id,
143
+ last_name,
144
+ permalink,
145
+ phone,
146
+ resource_id,
147
+ role,
148
+ timezone)
149
+ end
150
+ end
151
+ end
152
+ end