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.
- checksums.yaml +4 -4
- data/README.md +29 -68
- data/lib/gonebusy/api_helper.rb +181 -149
- data/lib/gonebusy/configuration.rb +51 -16
- data/lib/gonebusy/controllers/base_controller.rb +46 -45
- data/lib/gonebusy/controllers/bookings_controller.rb +257 -293
- data/lib/gonebusy/controllers/categories_controller.rb +151 -180
- data/lib/gonebusy/controllers/pricing_models_controller.rb +202 -241
- data/lib/gonebusy/controllers/resources_controller.rb +295 -355
- data/lib/gonebusy/controllers/schedules_controller.rb +361 -428
- data/lib/gonebusy/controllers/search_controller.rb +52 -63
- data/lib/gonebusy/controllers/services_controller.rb +310 -367
- data/lib/gonebusy/controllers/users_controller.rb +199 -239
- data/lib/gonebusy/exceptions/api_exception.rb +16 -16
- data/lib/gonebusy/exceptions/entities_error_error_exception.rb +27 -0
- data/lib/gonebusy/exceptions/entities_error_exception.rb +26 -26
- data/lib/gonebusy/gonebusy_client.rb +58 -58
- data/lib/gonebusy/http/auth/custom_auth.rb +15 -15
- data/lib/gonebusy/http/faraday_client.rb +43 -41
- data/lib/gonebusy/http/http_call_back.rb +17 -17
- data/lib/gonebusy/http/http_client.rb +84 -82
- data/lib/gonebusy/http/http_context.rb +15 -15
- data/lib/gonebusy/http/http_method_enum.rb +7 -7
- data/lib/gonebusy/http/http_request.rb +44 -44
- data/lib/gonebusy/http/http_response.rb +19 -19
- data/lib/gonebusy/models/base_model.rb +31 -31
- data/lib/gonebusy/models/cancel_booking_by_id_response.rb +35 -35
- data/lib/gonebusy/models/create_booking_body.rb +134 -80
- data/lib/gonebusy/models/create_booking_response.rb +35 -35
- data/lib/gonebusy/models/create_category_body.rb +71 -71
- data/lib/gonebusy/models/create_category_response.rb +35 -35
- data/lib/gonebusy/models/create_pricing_model_body.rb +80 -80
- data/lib/gonebusy/models/create_pricing_model_response.rb +35 -35
- data/lib/gonebusy/models/create_resource_body.rb +89 -89
- data/lib/gonebusy/models/create_resource_response.rb +35 -35
- data/lib/gonebusy/models/create_schedule_body.rb +143 -144
- data/lib/gonebusy/models/create_schedule_response.rb +35 -35
- data/lib/gonebusy/models/create_schedule_time_window_body.rb +116 -117
- data/lib/gonebusy/models/create_schedule_time_window_response.rb +35 -35
- data/lib/gonebusy/models/create_service_body.rb +107 -107
- data/lib/gonebusy/models/create_service_response.rb +35 -35
- data/lib/gonebusy/models/create_user_body.rb +89 -89
- data/lib/gonebusy/models/create_user_response.rb +35 -35
- data/lib/gonebusy/models/date_recurs_by_enum.rb +12 -12
- data/lib/gonebusy/models/delete_resource_by_id_response.rb +35 -35
- data/lib/gonebusy/models/delete_schedule_by_id_response.rb +35 -35
- data/lib/gonebusy/models/delete_schedule_time_window_by_id_response.rb +35 -35
- data/lib/gonebusy/models/delete_service_by_id_response.rb +35 -35
- data/lib/gonebusy/models/entities_address_entity.rb +116 -116
- data/lib/gonebusy/models/entities_availability_response.rb +58 -58
- data/lib/gonebusy/models/entities_booking_response.rb +71 -71
- data/lib/gonebusy/models/entities_category_response.rb +98 -98
- data/lib/gonebusy/models/entities_pricing_model_response.rb +89 -89
- data/lib/gonebusy/models/entities_resource_availabilities.rb +49 -49
- data/lib/gonebusy/models/entities_resource_response.rb +107 -107
- data/lib/gonebusy/models/entities_schedule_response.rb +76 -76
- data/lib/gonebusy/models/entities_search_response.rb +54 -54
- data/lib/gonebusy/models/entities_service_response.rb +134 -130
- data/lib/gonebusy/models/entities_slots.rb +44 -45
- data/lib/gonebusy/models/entities_thing_type_response.rb +44 -44
- data/lib/gonebusy/models/entities_time_window_response.rb +134 -135
- data/lib/gonebusy/models/entities_user_response.rb +152 -152
- data/lib/gonebusy/models/frequency_enum.rb +17 -17
- data/lib/gonebusy/models/gender_enum.rb +9 -9
- data/lib/gonebusy/models/get_booking_by_id_response.rb +35 -35
- data/lib/gonebusy/models/get_bookings_response.rb +40 -40
- data/lib/gonebusy/models/get_categories_response.rb +40 -40
- data/lib/gonebusy/models/get_category_by_id_response.rb +35 -35
- data/lib/gonebusy/models/get_pricing_model_by_id_response.rb +35 -35
- data/lib/gonebusy/models/get_pricing_models_response.rb +40 -40
- data/lib/gonebusy/models/get_resource_by_id_response.rb +35 -35
- data/lib/gonebusy/models/get_resource_things_response.rb +40 -40
- data/lib/gonebusy/models/get_resources_response.rb +40 -40
- data/lib/gonebusy/models/get_schedule_by_id_response.rb +35 -35
- data/lib/gonebusy/models/get_schedules_response.rb +40 -40
- data/lib/gonebusy/models/get_service_available_slots_by_id_response.rb +35 -35
- data/lib/gonebusy/models/get_service_by_id_response.rb +35 -35
- data/lib/gonebusy/models/get_services_response.rb +40 -40
- data/lib/gonebusy/models/get_user_by_id_response.rb +35 -35
- data/lib/gonebusy/models/get_users_response.rb +40 -40
- data/lib/gonebusy/models/occurrence_enum.rb +21 -21
- data/lib/gonebusy/models/recurs_by_enum.rb +15 -15
- data/lib/gonebusy/models/search_query_response.rb +35 -35
- data/lib/gonebusy/models/update_booking_by_id_body.rb +116 -0
- data/lib/gonebusy/models/update_booking_by_id_response.rb +35 -35
- data/lib/gonebusy/models/update_pricing_model_by_id_body.rb +62 -62
- data/lib/gonebusy/models/update_pricing_model_by_id_response.rb +35 -35
- data/lib/gonebusy/models/update_resource_by_id_body.rb +71 -71
- data/lib/gonebusy/models/update_resource_by_id_response.rb +35 -35
- data/lib/gonebusy/models/update_schedule_time_window_by_id_body.rb +116 -117
- data/lib/gonebusy/models/update_schedule_time_window_by_id_response.rb +35 -35
- data/lib/gonebusy/models/update_service_by_id_body.rb +98 -98
- data/lib/gonebusy/models/update_service_by_id_response.rb +35 -35
- data/lib/gonebusy/models/update_user_by_id_body.rb +89 -89
- data/lib/gonebusy/models/update_user_by_id_response.rb +35 -35
- data/lib/gonebusy.rb +108 -104
- metadata +53 -17
@@ -1,44 +1,44 @@
|
|
1
|
-
# This file was automatically generated
|
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[
|
36
|
-
name = hash[
|
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
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
#
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
#
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
#
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
#
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
#
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
#
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
#
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
#
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
#
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
#
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
#
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
#
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
@hash =
|
58
|
-
@hash["
|
59
|
-
@hash["
|
60
|
-
@hash["
|
61
|
-
@hash["
|
62
|
-
@hash["
|
63
|
-
@hash["
|
64
|
-
@hash["
|
65
|
-
@hash["
|
66
|
-
@hash["
|
67
|
-
@hash["
|
68
|
-
@hash["
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
@
|
87
|
-
@
|
88
|
-
@
|
89
|
-
@
|
90
|
-
@
|
91
|
-
@
|
92
|
-
@
|
93
|
-
@
|
94
|
-
@
|
95
|
-
@
|
96
|
-
@
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
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
|
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[
|
120
|
-
address = EntitiesAddressEntity.from_hash(hash[
|
121
|
-
business_name = hash[
|
122
|
-
disabled = hash[
|
123
|
-
email = hash[
|
124
|
-
external_url = hash[
|
125
|
-
first_name = hash[
|
126
|
-
id = hash[
|
127
|
-
last_name = hash[
|
128
|
-
permalink = hash[
|
129
|
-
phone = hash[
|
130
|
-
resource_id = hash[
|
131
|
-
role = hash[
|
132
|
-
timezone = hash[
|
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
|