simplyrets 0.1 → 1.0.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/Gemfile.lock +46 -13
- data/README.org +6 -6
- data/example.rb +9 -9
- data/lib/simplyrets.rb +33 -56
- data/lib/simplyrets/#listing.rb# +199 -0
- data/lib/simplyrets/api/default_api.rb +154 -0
- data/lib/simplyrets/listing.rb~ +199 -0
- data/lib/simplyrets/models/agent.rb +61 -0
- data/lib/simplyrets/models/base_object.rb +87 -0
- data/lib/simplyrets/models/broker.rb +37 -0
- data/lib/simplyrets/models/contact_information.rb +53 -0
- data/lib/simplyrets/models/error.rb +45 -0
- data/lib/simplyrets/models/geographic_data.rb +69 -0
- data/lib/simplyrets/models/listing.rb +199 -0
- data/lib/simplyrets/models/listing.rb~ +199 -0
- data/lib/simplyrets/models/mls_information.rb +69 -0
- data/lib/simplyrets/models/office.rb +61 -0
- data/lib/simplyrets/models/open_house.rb +37 -0
- data/lib/simplyrets/models/parking.rb +53 -0
- data/lib/simplyrets/models/property.rb +277 -0
- data/lib/simplyrets/models/sales.rb +69 -0
- data/lib/simplyrets/models/school.rb +61 -0
- data/lib/simplyrets/models/street_address.rb +85 -0
- data/lib/simplyrets/models/tax.rb +53 -0
- data/lib/simplyrets/simplyrets.rb +76 -0
- data/lib/simplyrets/simplyrets/api_error.rb +26 -0
- data/lib/simplyrets/simplyrets/configuration.rb +101 -0
- data/lib/simplyrets/simplyrets/request.rb +213 -0
- data/lib/simplyrets/simplyrets/response.rb +156 -0
- data/lib/simplyrets/simplyrets/version.rb +5 -0
- data/simplyrets.gemspec +16 -9
- metadata +153 -36
- data/#example.rb# +0 -29
- data/lib/monkey.rb +0 -90
- data/lib/properties_api.rb +0 -75
- data/lib/simplyrets.rb~ +0 -85
- data/lib/simplyrets/configuration.rb +0 -25
- data/lib/simplyrets/request.rb +0 -205
- data/lib/simplyrets/response.rb +0 -70
- data/lib/simplyrets/version.rb +0 -4
- data/models/agent.rb +0 -39
- data/models/contactinformation.rb +0 -36
- data/models/geographicdata.rb +0 -43
- data/models/listing.rb +0 -95
- data/models/mlsinformation.rb +0 -35
- data/models/office.rb +0 -39
- data/models/property.rb +0 -84
- data/models/school.rb +0 -27
- data/models/streetaddress.rb +0 -47
- data/models/tax.rb +0 -28
- data/pkg/simplyrets-0.1.gem +0 -0
@@ -0,0 +1,69 @@
|
|
1
|
+
module SimplyRetsClient
|
2
|
+
#
|
3
|
+
class MlsInformation < BaseObject
|
4
|
+
attr_accessor :status, :area, :days_on_market, :serving_name
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
# MLS Status Code. Compliant with data dictionary v1.3 ListingStatus
|
10
|
+
:'status' => :'status',
|
11
|
+
|
12
|
+
# MLS Area. Generally a subdivision or community name.
|
13
|
+
:'area' => :'area',
|
14
|
+
|
15
|
+
# Amount of days the property has been Active
|
16
|
+
:'days_on_market' => :'daysOnMarket',
|
17
|
+
|
18
|
+
# Alias for the listing office or brokerage
|
19
|
+
:'serving_name' => :'servingName'
|
20
|
+
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
# attribute type
|
25
|
+
def self.simplyrets_types
|
26
|
+
{
|
27
|
+
:'status' => :'String',
|
28
|
+
:'area' => :'String',
|
29
|
+
:'days_on_market' => :'Integer',
|
30
|
+
:'serving_name' => :'String'
|
31
|
+
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
def initialize(attributes = {})
|
36
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
37
|
+
|
38
|
+
# convert string to symbol for hash key
|
39
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
40
|
+
|
41
|
+
|
42
|
+
if attributes[:'status']
|
43
|
+
self.status = attributes[:'status']
|
44
|
+
end
|
45
|
+
|
46
|
+
if attributes[:'area']
|
47
|
+
self.area = attributes[:'area']
|
48
|
+
end
|
49
|
+
|
50
|
+
if attributes[:'daysOnMarket']
|
51
|
+
self.days_on_market = attributes[:'daysOnMarket']
|
52
|
+
end
|
53
|
+
|
54
|
+
if attributes[:'servingName']
|
55
|
+
self.serving_name = attributes[:'servingName']
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
|
60
|
+
def status=(status)
|
61
|
+
allowed_values = ["Active", "Pending", "Closed", "Expired", "Cancelled"]
|
62
|
+
if status && !allowed_values.include?(status)
|
63
|
+
fail "invalid value for 'status', must be one of #{allowed_values}"
|
64
|
+
end
|
65
|
+
@status = status
|
66
|
+
end
|
67
|
+
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
module SimplyRetsClient
|
2
|
+
#
|
3
|
+
class Office < BaseObject
|
4
|
+
attr_accessor :contact, :name, :serving_name, :brokerid
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
#
|
10
|
+
:'contact' => :'contact',
|
11
|
+
|
12
|
+
# Pimary office name
|
13
|
+
:'name' => :'name',
|
14
|
+
|
15
|
+
# Primary office or brokerage name
|
16
|
+
:'serving_name' => :'servingName',
|
17
|
+
|
18
|
+
# Office or brokerage MLS identifier
|
19
|
+
:'brokerid' => :'brokerid'
|
20
|
+
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
# attribute type
|
25
|
+
def self.simplyrets_types
|
26
|
+
{
|
27
|
+
:'contact' => :'ContactInformation',
|
28
|
+
:'name' => :'String',
|
29
|
+
:'serving_name' => :'String',
|
30
|
+
:'brokerid' => :'String'
|
31
|
+
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
def initialize(attributes = {})
|
36
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
37
|
+
|
38
|
+
# convert string to symbol for hash key
|
39
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
40
|
+
|
41
|
+
|
42
|
+
if attributes[:'contact']
|
43
|
+
self.contact = attributes[:'contact']
|
44
|
+
end
|
45
|
+
|
46
|
+
if attributes[:'name']
|
47
|
+
self.name = attributes[:'name']
|
48
|
+
end
|
49
|
+
|
50
|
+
if attributes[:'servingName']
|
51
|
+
self.serving_name = attributes[:'servingName']
|
52
|
+
end
|
53
|
+
|
54
|
+
if attributes[:'brokerid']
|
55
|
+
self.brokerid = attributes[:'brokerid']
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
module SimplyRetsClient
|
2
|
+
#
|
3
|
+
class OpenHouse < BaseObject
|
4
|
+
attr_accessor :startdate
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
# Start Date
|
10
|
+
:'startdate' => :'startdate'
|
11
|
+
|
12
|
+
}
|
13
|
+
end
|
14
|
+
|
15
|
+
# attribute type
|
16
|
+
def self.simplyrets_types
|
17
|
+
{
|
18
|
+
:'startdate' => :'DateTime'
|
19
|
+
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
def initialize(attributes = {})
|
24
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
25
|
+
|
26
|
+
# convert string to symbol for hash key
|
27
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
28
|
+
|
29
|
+
|
30
|
+
if attributes[:'startdate']
|
31
|
+
self.startdate = attributes[:'startdate']
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
module SimplyRetsClient
|
2
|
+
#
|
3
|
+
class Parking < BaseObject
|
4
|
+
attr_accessor :spaces, :description, :leased
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
# Number of parking spaces
|
10
|
+
:'spaces' => :'spaces',
|
11
|
+
|
12
|
+
# Parking features description
|
13
|
+
:'description' => :'description',
|
14
|
+
|
15
|
+
#
|
16
|
+
:'leased' => :'leased'
|
17
|
+
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
21
|
+
# attribute type
|
22
|
+
def self.simplyrets_types
|
23
|
+
{
|
24
|
+
:'spaces' => :'Integer',
|
25
|
+
:'description' => :'String',
|
26
|
+
:'leased' => :'String'
|
27
|
+
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
def initialize(attributes = {})
|
32
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
33
|
+
|
34
|
+
# convert string to symbol for hash key
|
35
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
36
|
+
|
37
|
+
|
38
|
+
if attributes[:'spaces']
|
39
|
+
self.spaces = attributes[:'spaces']
|
40
|
+
end
|
41
|
+
|
42
|
+
if attributes[:'description']
|
43
|
+
self.description = attributes[:'description']
|
44
|
+
end
|
45
|
+
|
46
|
+
if attributes[:'leased']
|
47
|
+
self.leased = attributes[:'leased']
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,277 @@
|
|
1
|
+
module SimplyRetsClient
|
2
|
+
#
|
3
|
+
class Property < BaseObject
|
4
|
+
attr_accessor :roof, :style, :area, :area_source, :baths_full, :baths_half, :stories, :fireplaces, :heating, :bedrooms, :interior_features, :lot_size, :exterior_features, :subdivision, :type, :year_built, :additional_rooms, :maintenance_expense, :garage_spaces, :pool_features, :lot_description, :occupant_type, :occupant_name, :foundation, :laundry_features, :construction_materials, :view, :water, :accessibility, :parking
|
5
|
+
# attribute mapping from ruby-style variable name to JSON key
|
6
|
+
def self.attribute_map
|
7
|
+
{
|
8
|
+
|
9
|
+
# Property roof description
|
10
|
+
:'roof' => :'roof',
|
11
|
+
|
12
|
+
# Property style description or short string
|
13
|
+
:'style' => :'style',
|
14
|
+
|
15
|
+
# Square footage of the building associated with a listing
|
16
|
+
:'area' => :'area',
|
17
|
+
|
18
|
+
#
|
19
|
+
:'area_source' => :'areaSource',
|
20
|
+
|
21
|
+
# Number of full bathrooms
|
22
|
+
:'baths_full' => :'bathsFull',
|
23
|
+
|
24
|
+
# Number of half bathrooms
|
25
|
+
:'baths_half' => :'bathsHalf',
|
26
|
+
|
27
|
+
# Number of stories or levels. Represented as a `double' to\naccount for half stories.\n
|
28
|
+
:'stories' => :'stories',
|
29
|
+
|
30
|
+
# Number of fireplaces
|
31
|
+
:'fireplaces' => :'fireplaces',
|
32
|
+
|
33
|
+
# Heating description or short string
|
34
|
+
:'heating' => :'heating',
|
35
|
+
|
36
|
+
# Number of bedrooms
|
37
|
+
:'bedrooms' => :'bedrooms',
|
38
|
+
|
39
|
+
# The properties interior features
|
40
|
+
:'interior_features' => :'interiorFeatures',
|
41
|
+
|
42
|
+
# Square footage of the entire property lot
|
43
|
+
:'lot_size' => :'lotSize',
|
44
|
+
|
45
|
+
#
|
46
|
+
:'exterior_features' => :'exteriorFeatures',
|
47
|
+
|
48
|
+
# The subdivision or community name
|
49
|
+
:'subdivision' => :'subdivision',
|
50
|
+
|
51
|
+
# Property type (Residential, Multi-Family, Rental)
|
52
|
+
:'type' => :'type',
|
53
|
+
|
54
|
+
# Year the property was built
|
55
|
+
:'year_built' => :'yearBuilt',
|
56
|
+
|
57
|
+
# Additional room information
|
58
|
+
:'additional_rooms' => :'additionalRooms',
|
59
|
+
|
60
|
+
# Yearly maintenance expense
|
61
|
+
:'maintenance_expense' => :'maintenanceExpense',
|
62
|
+
|
63
|
+
# Number of garage spaces
|
64
|
+
:'garage_spaces' => :'garageSpaces',
|
65
|
+
|
66
|
+
#
|
67
|
+
:'pool_features' => :'poolFeatures',
|
68
|
+
|
69
|
+
#
|
70
|
+
:'lot_description' => :'lotDescription',
|
71
|
+
|
72
|
+
#
|
73
|
+
:'occupant_type' => :'occupantType',
|
74
|
+
|
75
|
+
#
|
76
|
+
:'occupant_name' => :'occupantName',
|
77
|
+
|
78
|
+
#
|
79
|
+
:'foundation' => :'foundation',
|
80
|
+
|
81
|
+
#
|
82
|
+
:'laundry_features' => :'laundryFeatures',
|
83
|
+
|
84
|
+
#
|
85
|
+
:'construction_materials' => :'constructionMaterials',
|
86
|
+
|
87
|
+
# View details and description
|
88
|
+
:'view' => :'view',
|
89
|
+
|
90
|
+
# Water description and details
|
91
|
+
:'water' => :'water',
|
92
|
+
|
93
|
+
#
|
94
|
+
:'accessibility' => :'accessibility',
|
95
|
+
|
96
|
+
#
|
97
|
+
:'parking' => :'parking'
|
98
|
+
|
99
|
+
}
|
100
|
+
end
|
101
|
+
|
102
|
+
# attribute type
|
103
|
+
def self.simplyrets_types
|
104
|
+
{
|
105
|
+
:'roof' => :'String',
|
106
|
+
:'style' => :'String',
|
107
|
+
:'area' => :'Integer',
|
108
|
+
:'area_source' => :'String',
|
109
|
+
:'baths_full' => :'Integer',
|
110
|
+
:'baths_half' => :'Integer',
|
111
|
+
:'stories' => :'Float',
|
112
|
+
:'fireplaces' => :'Integer',
|
113
|
+
:'heating' => :'String',
|
114
|
+
:'bedrooms' => :'Integer',
|
115
|
+
:'interior_features' => :'String',
|
116
|
+
:'lot_size' => :'String',
|
117
|
+
:'exterior_features' => :'String',
|
118
|
+
:'subdivision' => :'String',
|
119
|
+
:'type' => :'String',
|
120
|
+
:'year_built' => :'Integer',
|
121
|
+
:'additional_rooms' => :'String',
|
122
|
+
:'maintenance_expense' => :'Float',
|
123
|
+
:'garage_spaces' => :'Float',
|
124
|
+
:'pool_features' => :'String',
|
125
|
+
:'lot_description' => :'String',
|
126
|
+
:'occupant_type' => :'String',
|
127
|
+
:'occupant_name' => :'String',
|
128
|
+
:'foundation' => :'String',
|
129
|
+
:'laundry_features' => :'String',
|
130
|
+
:'construction_materials' => :'String',
|
131
|
+
:'view' => :'String',
|
132
|
+
:'water' => :'String',
|
133
|
+
:'accessibility' => :'String',
|
134
|
+
:'parking' => :'School'
|
135
|
+
|
136
|
+
}
|
137
|
+
end
|
138
|
+
|
139
|
+
def initialize(attributes = {})
|
140
|
+
return if !attributes.is_a?(Hash) || attributes.empty?
|
141
|
+
|
142
|
+
# convert string to symbol for hash key
|
143
|
+
attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
|
144
|
+
|
145
|
+
|
146
|
+
if attributes[:'roof']
|
147
|
+
self.roof = attributes[:'roof']
|
148
|
+
end
|
149
|
+
|
150
|
+
if attributes[:'style']
|
151
|
+
self.style = attributes[:'style']
|
152
|
+
end
|
153
|
+
|
154
|
+
if attributes[:'area']
|
155
|
+
self.area = attributes[:'area']
|
156
|
+
end
|
157
|
+
|
158
|
+
if attributes[:'areaSource']
|
159
|
+
self.area_source = attributes[:'areaSource']
|
160
|
+
end
|
161
|
+
|
162
|
+
if attributes[:'bathsFull']
|
163
|
+
self.baths_full = attributes[:'bathsFull']
|
164
|
+
end
|
165
|
+
|
166
|
+
if attributes[:'bathsHalf']
|
167
|
+
self.baths_half = attributes[:'bathsHalf']
|
168
|
+
end
|
169
|
+
|
170
|
+
if attributes[:'stories']
|
171
|
+
self.stories = attributes[:'stories']
|
172
|
+
end
|
173
|
+
|
174
|
+
if attributes[:'fireplaces']
|
175
|
+
self.fireplaces = attributes[:'fireplaces']
|
176
|
+
end
|
177
|
+
|
178
|
+
if attributes[:'heating']
|
179
|
+
self.heating = attributes[:'heating']
|
180
|
+
end
|
181
|
+
|
182
|
+
if attributes[:'bedrooms']
|
183
|
+
self.bedrooms = attributes[:'bedrooms']
|
184
|
+
end
|
185
|
+
|
186
|
+
if attributes[:'interiorFeatures']
|
187
|
+
self.interior_features = attributes[:'interiorFeatures']
|
188
|
+
end
|
189
|
+
|
190
|
+
if attributes[:'lotSize']
|
191
|
+
self.lot_size = attributes[:'lotSize']
|
192
|
+
end
|
193
|
+
|
194
|
+
if attributes[:'exteriorFeatures']
|
195
|
+
self.exterior_features = attributes[:'exteriorFeatures']
|
196
|
+
end
|
197
|
+
|
198
|
+
if attributes[:'subdivision']
|
199
|
+
self.subdivision = attributes[:'subdivision']
|
200
|
+
end
|
201
|
+
|
202
|
+
if attributes[:'type']
|
203
|
+
self.type = attributes[:'type']
|
204
|
+
end
|
205
|
+
|
206
|
+
if attributes[:'yearBuilt']
|
207
|
+
self.year_built = attributes[:'yearBuilt']
|
208
|
+
end
|
209
|
+
|
210
|
+
if attributes[:'additionalRooms']
|
211
|
+
self.additional_rooms = attributes[:'additionalRooms']
|
212
|
+
end
|
213
|
+
|
214
|
+
if attributes[:'maintenanceExpense']
|
215
|
+
self.maintenance_expense = attributes[:'maintenanceExpense']
|
216
|
+
end
|
217
|
+
|
218
|
+
if attributes[:'garageSpaces']
|
219
|
+
self.garage_spaces = attributes[:'garageSpaces']
|
220
|
+
end
|
221
|
+
|
222
|
+
if attributes[:'poolFeatures']
|
223
|
+
self.pool_features = attributes[:'poolFeatures']
|
224
|
+
end
|
225
|
+
|
226
|
+
if attributes[:'lotDescription']
|
227
|
+
self.lot_description = attributes[:'lotDescription']
|
228
|
+
end
|
229
|
+
|
230
|
+
if attributes[:'occupantType']
|
231
|
+
self.occupant_type = attributes[:'occupantType']
|
232
|
+
end
|
233
|
+
|
234
|
+
if attributes[:'occupantName']
|
235
|
+
self.occupant_name = attributes[:'occupantName']
|
236
|
+
end
|
237
|
+
|
238
|
+
if attributes[:'foundation']
|
239
|
+
self.foundation = attributes[:'foundation']
|
240
|
+
end
|
241
|
+
|
242
|
+
if attributes[:'laundryFeatures']
|
243
|
+
self.laundry_features = attributes[:'laundryFeatures']
|
244
|
+
end
|
245
|
+
|
246
|
+
if attributes[:'constructionMaterials']
|
247
|
+
self.construction_materials = attributes[:'constructionMaterials']
|
248
|
+
end
|
249
|
+
|
250
|
+
if attributes[:'view']
|
251
|
+
self.view = attributes[:'view']
|
252
|
+
end
|
253
|
+
|
254
|
+
if attributes[:'water']
|
255
|
+
self.water = attributes[:'water']
|
256
|
+
end
|
257
|
+
|
258
|
+
if attributes[:'accessibility']
|
259
|
+
self.accessibility = attributes[:'accessibility']
|
260
|
+
end
|
261
|
+
|
262
|
+
if attributes[:'parking']
|
263
|
+
self.parking = attributes[:'parking']
|
264
|
+
end
|
265
|
+
|
266
|
+
end
|
267
|
+
|
268
|
+
def type=(type)
|
269
|
+
allowed_values = ["RES", "CND", "RNT"]
|
270
|
+
if type && !allowed_values.include?(type)
|
271
|
+
fail "invalid value for 'type', must be one of #{allowed_values}"
|
272
|
+
end
|
273
|
+
@type = type
|
274
|
+
end
|
275
|
+
|
276
|
+
end
|
277
|
+
end
|