mits 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +9 -0
  3. data/{LICENSE.txt → LICENSE} +0 -0
  4. data/README.md +34 -16
  5. data/lib/mits/document.rb +35 -0
  6. data/lib/mits/entities/address.rb +16 -0
  7. data/lib/mits/entities/amenity.rb +8 -0
  8. data/lib/mits/entities/company.rb +11 -0
  9. data/lib/mits/entities/deposit.rb +11 -0
  10. data/lib/mits/entities/fees.rb +15 -0
  11. data/lib/mits/entities/file.rb +16 -0
  12. data/lib/mits/entities/pet.rb +11 -0
  13. data/lib/mits/entities/pet_policy.rb +15 -0
  14. data/lib/mits/entities/property.rb +20 -0
  15. data/lib/mits/entities/unit.rb +11 -0
  16. data/lib/mits/mapper.rb +48 -0
  17. data/lib/mits/mappers/address_mapper.rb +29 -0
  18. data/lib/mits/mappers/amenities_mapper.rb +14 -0
  19. data/lib/mits/mappers/company_mapper.rb +11 -0
  20. data/lib/mits/mappers/deposit_mapper.rb +24 -0
  21. data/lib/mits/mappers/fees_mapper.rb +15 -0
  22. data/lib/mits/mappers/files_mapper.rb +19 -0
  23. data/lib/mits/mappers/pet_policy_mapper.rb +28 -0
  24. data/lib/mits/mappers/property_mapper.rb +41 -0
  25. data/lib/mits/mappers/units_mapper.rb +22 -0
  26. data/lib/mits/saxerator_ext.rb +29 -0
  27. data/lib/mits/version.rb +2 -2
  28. data/lib/mits.rb +9 -3
  29. data/mits.gemspec +13 -6
  30. data/spec/fixtures/mits.xml +396 -0
  31. data/spec/fixtures/property.yml +205 -0
  32. data/spec/lib/mits/document_spec.rb +23 -0
  33. data/spec/lib/mits/entities/address_spec.rb +16 -0
  34. data/spec/lib/mits/entities/amenity_spec.rb +8 -0
  35. data/spec/lib/mits/entities/company_spec.rb +0 -0
  36. data/spec/lib/mits/entities/deposit_spec.rb +11 -0
  37. data/spec/lib/mits/entities/fees_spec.rb +15 -0
  38. data/spec/lib/mits/entities/file_spec.rb +17 -0
  39. data/spec/lib/mits/entities/pet_policy_spec.rb +14 -0
  40. data/spec/lib/mits/entities/pet_spec.rb +12 -0
  41. data/spec/lib/mits/entities/property_spec.rb +20 -0
  42. data/spec/lib/mits/entities/unit_spec.rb +11 -0
  43. data/spec/lib/mits/mapper_spec.rb +180 -0
  44. data/spec/spec_helper.rb +22 -0
  45. metadata +147 -8
@@ -0,0 +1,396 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <PhysicalProperty xsi:noNamespaceSchemaLocation="http://rentals.appfolio.com/mits/v40/schemas/marketing.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3
+ <Management IDValue="guid: 1" IDType="Company">
4
+ <PropertyContacts>
5
+ <Companies>
6
+ <Identification IDValue="guid: 1" IDType="Company"/>
7
+ <CompanyName>Roob Inc</CompanyName>
8
+ <Address AddressType="other">
9
+ <Description>Address of Property Management Company</Description>
10
+ <AddressLine1></AddressLine1>
11
+ <AddressLine2></AddressLine2>
12
+ <City></City>
13
+ <State></State>
14
+ <PostalCode></PostalCode>
15
+ <Country></Country>
16
+ </Address>
17
+ <WebSite>http://leannonlehner.info/rory_mueller</WebSite>
18
+ <Logo></Logo>
19
+ </Companies>
20
+ </PropertyContacts>
21
+ </Management>
22
+ <Property IDValue="SomethingRandom1">
23
+ <PropertyID>
24
+ <Identification IDValue="SomethingRandom1" IDType="property" OrganizationName="parker"/>
25
+ <Identification IDValue="guid: 1" IDType="Company" OrganizationName="parker"/>
26
+ <MarketingName>Cool New Apartment!!!!</MarketingName>
27
+ <WebSite>http://harris.net/juwan</WebSite>
28
+ <Address AddressType="property">
29
+ <Description>Address of Available Listing</Description>
30
+ <AddressLine1>123 Main St</AddressLine1>
31
+ <City>Santa Barbara</City>
32
+ <State>CA</State>
33
+ <PostalCode>93003</PostalCode>
34
+ <Country>US</Country>
35
+ </Address>
36
+ <Phone PhoneType="office">
37
+ <PhoneNumber>4449995555</PhoneNumber>
38
+ </Phone>
39
+ </PropertyID>
40
+ <ILS_Identification RentalType="Market Rate" ILS_IdentificationType="House for Rent">
41
+ <Latitude>44.0</Latitude>
42
+ <Longitude>45.55</Longitude>
43
+ <LastUpdate Month="3" Day="19" Year="2012"/>
44
+ </ILS_Identification>
45
+ <Information>
46
+ <StructureType>Standard</StructureType>
47
+ <UnitCount>1</UnitCount>
48
+ <YearBuilt>1970</YearBuilt>
49
+ <ShortDescription>Cool New Apartment!!!!</ShortDescription>
50
+ <LongDescription>hello. this is a description</LongDescription>
51
+ <Rents>
52
+ <StandardRent>3400.00</StandardRent>
53
+ </Rents>
54
+ <PropertyAvailabilityURL>http://harris.net/juwan</PropertyAvailabilityURL>
55
+ </Information>
56
+ <Fee>
57
+ <ProrateType>Standard</ProrateType>
58
+ <LateType>Standard</LateType>
59
+ <LatePercent>0</LatePercent>
60
+ <LateMinFee>0</LateMinFee>
61
+ <LateFeePerDay>0</LateFeePerDay>
62
+ <NonRefundableHoldFee>0</NonRefundableHoldFee>
63
+ <AdminFee>0</AdminFee>
64
+ <ApplicationFee>50.00</ApplicationFee>
65
+ <BrokerFee>0</BrokerFee>
66
+ </Fee>
67
+ <Deposit DepositType="Security Deposit">
68
+ <Amount AmountType="Actual">
69
+ <ValueRange Exact="3000.00" Currency="USD"/>
70
+ </Amount>
71
+ </Deposit>
72
+ <Policy>
73
+ <Pet Allowed="false"/>
74
+ </Policy>
75
+ <Phase IDValue="SomethingRandom1">
76
+ <Name/>
77
+ <Description/>
78
+ <UnitCount>1</UnitCount>
79
+ <RentableUnits>1</RentableUnits>
80
+ <TotalSquareFeet>3400</TotalSquareFeet>
81
+ <RentableSquareFeet>3400</RentableSquareFeet>
82
+ </Phase>
83
+ <Building IDValue="SomethingRandom1">
84
+ <Name/>
85
+ <Description/>
86
+ <UnitCount>1</UnitCount>
87
+ <SquareFeet>3400</SquareFeet>
88
+ </Building>
89
+ <Floorplan IDValue="SomethingRandom1">
90
+ <Name/>
91
+ <UnitCount>1</UnitCount>
92
+ <Room RoomType="Bedroom">
93
+ <Count>4</Count>
94
+ <Comment/>
95
+ </Room>
96
+ <Room RoomType="Bathroom">
97
+ <Count>4</Count>
98
+ <Comment/>
99
+ </Room>
100
+ <SquareFeet Max="3400" Min="3400"/>
101
+ <MarketRent Max="3400" Min="3400"/>
102
+ <EffectiveRent Max="3400" Min="3400"/>
103
+ </Floorplan>
104
+ <ILS_Unit IDValue="SomethingRandom1">
105
+ <Units>
106
+ <Unit>
107
+ <Identification IDValue="SomethingRandom1" OrganizationName="Roob Inc"/>
108
+ <MarketingName>Cool New Apartment!!!!</MarketingName>
109
+ <UnitBedrooms>4</UnitBedrooms>
110
+ <UnitBathrooms>4.0</UnitBathrooms>
111
+ <MinSquareFeet>3400</MinSquareFeet>
112
+ <MaxSquareFeet>3400</MaxSquareFeet>
113
+ <SquareFootType>internal</SquareFootType>
114
+ <UnitRent>3400.00</UnitRent>
115
+ <MarketRent>3400.00</MarketRent>
116
+ <Address AddressType="property">
117
+ <AddressLine1>123 Main St</AddressLine1>
118
+ <City>Santa Barbara</City>
119
+ <PostalCode>93003</PostalCode>
120
+ <Country>US</Country>
121
+ </Address>
122
+ </Unit>
123
+ </Units>
124
+ <Availability>
125
+ <VacateDate Month="3" Day="20" Year="2012"/>
126
+ <VacancyClass>Unoccupied</VacancyClass>
127
+ <MadeReadyDate Month="3" Day="20" Year="2012"/>
128
+ </Availability>
129
+ <Amenity AmenityType="Refrigerator">
130
+ <Description>Refrigerator</Description>
131
+ </Amenity>
132
+ <Amenity AmenityType="Range">
133
+ <Description>Range</Description>
134
+ </Amenity>
135
+ <Amenity AmenityType="Microwave">
136
+ <Description>Built-In Microwave</Description>
137
+ </Amenity>
138
+ <Amenity AmenityType="DishWasher">
139
+ <Description>Built-In Dishwasher</Description>
140
+ </Amenity>
141
+ <Amenity AmenityType="Washer">
142
+ <Description>Built-In Dishwasher</Description>
143
+ </Amenity>
144
+ <Amenity AmenityType="Disposal">
145
+ <Description>Garbage Disposal</Description>
146
+ </Amenity>
147
+ <Amenity AmenityType="Dryer">
148
+ <Description>Stackable Washer/Dryer</Description>
149
+ </Amenity>
150
+ <Amenity AmenityType="Washer">
151
+ <Description>Stackable Washer/Dryer</Description>
152
+ </Amenity>
153
+ <Amenity AmenityType="Other">
154
+ <Description>Stainless steel appliances</Description>
155
+ </Amenity>
156
+ <Amenity AmenityType="Other">
157
+ <Description>French Doors</Description>
158
+ </Amenity>
159
+ <Amenity AmenityType="Other">
160
+ <Description>All appliances</Description>
161
+ </Amenity>
162
+ <Amenity AmenityType="Other">
163
+ <Description>Landscaping included</Description>
164
+ </Amenity>
165
+ <Amenity AmenityType="Garage">
166
+ <Description>2 Car Garage</Description>
167
+ </Amenity>
168
+ <Amenity AmenityType="Other">
169
+ <Description>Great Location</Description>
170
+ </Amenity>
171
+ </ILS_Unit>
172
+ <File FileID="46" Active="true">
173
+ <FileType>Photo</FileType>
174
+ <Description>Unit Photo</Description>
175
+ <Name/>
176
+ <Caption/>
177
+ <Format>image/jpg</Format>
178
+ <Src>http://douglaslebsack.name/triston_botsford</Src>
179
+ <Width>0</Width>
180
+ <Height>0</Height>
181
+ <Rank>1</Rank>
182
+ </File>
183
+ <File FileID="47" Active="true">
184
+ <FileType>Photo</FileType>
185
+ <Description>Unit Photo</Description>
186
+ <Name/>
187
+ <Caption/>
188
+ <Format>image/jpg</Format>
189
+ <Src>http://vonbrown.com/wilhelmine.beatty</Src>
190
+ <Width>0</Width>
191
+ <Height>0</Height>
192
+ <Rank>2</Rank>
193
+ </File>
194
+ <File FileID="48" Active="true">
195
+ <FileType>Photo</FileType>
196
+ <Description>Unit Photo</Description>
197
+ <Name/>
198
+ <Caption/>
199
+ <Format>image/jpg</Format>
200
+ <Src>http://cummings.biz/kaela</Src>
201
+ <Width>0</Width>
202
+ <Height>0</Height>
203
+ <Rank>3</Rank>
204
+ </File>
205
+ </Property>
206
+ <Property IDValue="SomethingRandom2">
207
+ <PropertyID>
208
+ <Identification IDValue="SomethingRandom2" IDType="property" OrganizationName="jaskolski"/>
209
+ <Identification IDValue="guid: 2" IDType="Company" OrganizationName="jaskolski"/>
210
+ <MarketingName>Cool New Apartment!!!!</MarketingName>
211
+ <WebSite>http://terry.info/harrison_bernier</WebSite>
212
+ <Address AddressType="property">
213
+ <Description>Address of Available Listing</Description>
214
+ <AddressLine1>125 Main St</AddressLine1>
215
+ <City>Santa Barbara</City>
216
+ <State>CA</State>
217
+ <PostalCode>93003</PostalCode>
218
+ <Country>US</Country>
219
+ </Address>
220
+ <Phone PhoneType="office">
221
+ <PhoneNumber>4449995555</PhoneNumber>
222
+ </Phone>
223
+ </PropertyID>
224
+ <ILS_Identification RentalType="Market Rate" ILS_IdentificationType="Apartment">
225
+ <Latitude>44.0</Latitude>
226
+ <Longitude>45.55</Longitude>
227
+ <LastUpdate Month="3" Day="20" Year="2012"/>
228
+ </ILS_Identification>
229
+ <Information>
230
+ <StructureType>Standard</StructureType>
231
+ <UnitCount>1</UnitCount>
232
+ <YearBuilt>1990</YearBuilt>
233
+ <ShortDescription>Cool New Apartment!!!!</ShortDescription>
234
+ <LongDescription>hello</LongDescription>
235
+ <Rents>
236
+ <StandardRent>3400.00</StandardRent>
237
+ </Rents>
238
+ <PropertyAvailabilityURL>http://terry.info/harrison_bernier</PropertyAvailabilityURL>
239
+ </Information>
240
+ <Fee>
241
+ <ProrateType>Standard</ProrateType>
242
+ <LateType>Standard</LateType>
243
+ <LatePercent>0</LatePercent>
244
+ <LateMinFee>0</LateMinFee>
245
+ <LateFeePerDay>0</LateFeePerDay>
246
+ <NonRefundableHoldFee>0</NonRefundableHoldFee>
247
+ <AdminFee>0</AdminFee>
248
+ <ApplicationFee>20.00</ApplicationFee>
249
+ <BrokerFee>0</BrokerFee>
250
+ </Fee>
251
+ <Deposit DepositType="Security Deposit">
252
+ <Amount AmountType="Actual">
253
+ <ValueRange Exact="3300.00" Currency="USD"/>
254
+ </Amount>
255
+ </Deposit>
256
+ <Policy>
257
+ <Pet Allowed="false"/>
258
+ </Policy>
259
+ <Phase IDValue="SomethingRandom2">
260
+ <Name/>
261
+ <Description/>
262
+ <UnitCount>1</UnitCount>
263
+ <RentableUnits>1</RentableUnits>
264
+ <TotalSquareFeet>3400</TotalSquareFeet>
265
+ <RentableSquareFeet>3400</RentableSquareFeet>
266
+ </Phase>
267
+ <Building IDValue="SomethingRandom2">
268
+ <Name/>
269
+ <Description/>
270
+ <UnitCount>1</UnitCount>
271
+ <SquareFeet>3400</SquareFeet>
272
+ </Building>
273
+ <Floorplan IDValue="SomethingRandom2">
274
+ <Name/>
275
+ <UnitCount>1</UnitCount>
276
+ <Room RoomType="Bedroom">
277
+ <Count>4</Count>
278
+ <Comment/>
279
+ </Room>
280
+ <Room RoomType="Bathroom">
281
+ <Count>4</Count>
282
+ <Comment/>
283
+ </Room>
284
+ <SquareFeet Max="3400" Min="3400"/>
285
+ <MarketRent Max="3400" Min="3400"/>
286
+ <EffectiveRent Max="3400" Min="3400"/>
287
+ </Floorplan>
288
+ <ILS_Unit IDValue="SomethingRandom2">
289
+ <Units>
290
+ <Unit>
291
+ <Identification IDValue="SomethingRandom2" OrganizationName="Durgan LLC"/>
292
+ <MarketingName>Cool New Apartment!!!!</MarketingName>
293
+ <UnitBedrooms>4</UnitBedrooms>
294
+ <UnitBathrooms>4.0</UnitBathrooms>
295
+ <MinSquareFeet>3400</MinSquareFeet>
296
+ <MaxSquareFeet>3400</MaxSquareFeet>
297
+ <SquareFootType>internal</SquareFootType>
298
+ <UnitRent>3400.00</UnitRent>
299
+ <MarketRent>3400.00</MarketRent>
300
+ <Address AddressType="property">
301
+ <AddressLine1>125 Main St</AddressLine1>
302
+ <City>Santa Barbara</City>
303
+ <PostalCode>93003</PostalCode>
304
+ <Country>US</Country>
305
+ </Address>
306
+ </Unit>
307
+ <Unit>
308
+ <Identification IDValue="SomethingRandom2" OrganizationName="Durgan LLC"/>
309
+ <MarketingName>Cool New Apartment!!!!</MarketingName>
310
+ <UnitBedrooms>4</UnitBedrooms>
311
+ <UnitBathrooms>4.0</UnitBathrooms>
312
+ <MinSquareFeet>3400</MinSquareFeet>
313
+ <MaxSquareFeet>3400</MaxSquareFeet>
314
+ <SquareFootType>internal</SquareFootType>
315
+ <UnitRent>3400.00</UnitRent>
316
+ <MarketRent>3400.00</MarketRent>
317
+ <Address AddressType="property">
318
+ <AddressLine1>125 Main St</AddressLine1>
319
+ <City>Santa Barbara</City>
320
+ <PostalCode>93003</PostalCode>
321
+ <Country>US</Country>
322
+ </Address>
323
+ </Unit>
324
+ </Units>
325
+ <Availability>
326
+ <VacateDate Month="3" Day="18" Year="2012"/>
327
+ <VacancyClass>Unoccupied</VacancyClass>
328
+ <MadeReadyDate Month="3" Day="18" Year="2012"/>
329
+ </Availability>
330
+ <Amenity AmenityType="Refrigerator">
331
+ <Description>Refrigerator</Description>
332
+ </Amenity>
333
+ <Amenity AmenityType="Range">
334
+ <Description>Range</Description>
335
+ </Amenity>
336
+ <Amenity AmenityType="Microwave">
337
+ <Description>Built-In Microwave</Description>
338
+ </Amenity>
339
+ <Amenity AmenityType="DishWasher">
340
+ <Description>Built-In Dishwasher</Description>
341
+ </Amenity>
342
+ <Amenity AmenityType="Washer">
343
+ <Description>Built-In Dishwasher</Description>
344
+ </Amenity>
345
+ <Amenity AmenityType="Disposal">
346
+ <Description>Garbage Disposal</Description>
347
+ </Amenity>
348
+ <Amenity AmenityType="Dryer">
349
+ <Description>Stackable Washer/Dryer</Description>
350
+ </Amenity>
351
+ <Amenity AmenityType="Washer">
352
+ <Description>Stackable Washer/Dryer</Description>
353
+ </Amenity>
354
+ <Amenity AmenityType="Other">
355
+ <Description>Stainless steel appliances</Description>
356
+ </Amenity>
357
+ <Amenity AmenityType="Other">
358
+ <Description>French Doors</Description>
359
+ </Amenity>
360
+ <Amenity AmenityType="Other">
361
+ <Description>All appliances</Description>
362
+ </Amenity>
363
+ <Amenity AmenityType="Other">
364
+ <Description>Landscaping included</Description>
365
+ </Amenity>
366
+ <Amenity AmenityType="Garage">
367
+ <Description>2 Car Garage</Description>
368
+ </Amenity>
369
+ <Amenity AmenityType="Other">
370
+ <Description>Great Location</Description>
371
+ </Amenity>
372
+ </ILS_Unit>
373
+ <File FileID="49" Active="true">
374
+ <FileType>Photo</FileType>
375
+ <Description>Unit Photo</Description>
376
+ <Name/>
377
+ <Caption/>
378
+ <Format>image/jpg</Format>
379
+ <Src>http://maggioabbott.org/gordon</Src>
380
+ <Width>0</Width>
381
+ <Height>0</Height>
382
+ <Rank>1</Rank>
383
+ </File>
384
+ <File FileID="50" Active="true">
385
+ <FileType>Photo</FileType>
386
+ <Description>Unit Photo</Description>
387
+ <Name/>
388
+ <Caption/>
389
+ <Format>image/jpg</Format>
390
+ <Src>http://littlekreiger.com/lynn_swift</Src>
391
+ <Width>0</Width>
392
+ <Height>0</Height>
393
+ <Rank>2</Rank>
394
+ </File>
395
+ </Property>
396
+ </PhysicalProperty>
@@ -0,0 +1,205 @@
1
+ ---
2
+ :PropertyID:
3
+ :Identification:
4
+ - :IDValue: SomethingRandom1
5
+ :IDType: property
6
+ :OrganizationName: parker
7
+ - :IDValue: 'guid: 1'
8
+ :IDType: Company
9
+ :OrganizationName: parker
10
+ :MarketingName: Cool New Apartment!!!!
11
+ :WebSite: http://harris.net/juwan
12
+ :Address:
13
+ :Description: Address of Available Listing
14
+ :AddressLine1: 123 Main St
15
+ :City: Santa Barbara
16
+ :State: CA
17
+ :PostalCode: '93003'
18
+ :Country: US
19
+ :AddressType: property
20
+ :Phone:
21
+ :PhoneNumber: '4449995555'
22
+ :PhoneType: office
23
+ :ILS_Identification:
24
+ :Latitude: '44.0'
25
+ :Longitude: '45.55'
26
+ :LastUpdate:
27
+ :Month: '3'
28
+ :Day: '19'
29
+ :Year: '2012'
30
+ :RentalType: Market Rate
31
+ :ILS_IdentificationType: House for Rent
32
+ :Information:
33
+ :StructureType: Standard
34
+ :UnitCount: '1'
35
+ :YearBuilt: '1970'
36
+ :ShortDescription: Cool New Apartment!!!!
37
+ :LongDescription: hello. this is a description
38
+ :Rents:
39
+ :StandardRent: '3400.00'
40
+ :PropertyAvailabilityURL: http://harris.net/juwan
41
+ :Fee:
42
+ :ProrateType: Standard
43
+ :LateType: Standard
44
+ :LatePercent: '0'
45
+ :LateMinFee: '0'
46
+ :LateFeePerDay: '0'
47
+ :NonRefundableHoldFee: '0'
48
+ :AdminFee: '0'
49
+ :ApplicationFee: '50.00'
50
+ :BrokerFee: '0'
51
+ :Deposit:
52
+ :Amount:
53
+ :ValueRange:
54
+ :Exact: '3000.00'
55
+ :Currency: USD
56
+ :AmountType: Actual
57
+ :DepositType: Security Deposit
58
+ :Policy:
59
+ :Pet:
60
+ :Allowed: 'true'
61
+ :Pets:
62
+ - :PetType: Dog
63
+ :Description: ''
64
+ :Count: 1
65
+ :Size: Large
66
+ :Weight: 60lbs
67
+ - :PetType: Reptile
68
+ :Description: ''
69
+ :Count: 1
70
+ :Size: Small
71
+ :Weight: Under 10lbs
72
+ :Comment: 'No cats allowed'
73
+ :Deposit: '50.00'
74
+ :Fee: '25.00'
75
+ :Rent: '100.00'
76
+ :PetCare: 'true'
77
+ :Phase:
78
+ :Name: {}
79
+ :Description: {}
80
+ :UnitCount: '1'
81
+ :RentableUnits: '1'
82
+ :TotalSquareFeet: '3400'
83
+ :RentableSquareFeet: '3400'
84
+ :IDValue: SomethingRandom1
85
+ :Building:
86
+ :Name: {}
87
+ :Description: {}
88
+ :UnitCount: '1'
89
+ :SquareFeet: '3400'
90
+ :IDValue: SomethingRandom1
91
+ :Floorplan:
92
+ :Name: {}
93
+ :UnitCount: '1'
94
+ :Room:
95
+ - :Count: '4'
96
+ :Comment: {}
97
+ :RoomType: Bedroom
98
+ - :Count: '4'
99
+ :Comment: {}
100
+ :RoomType: Bathroom
101
+ :SquareFeet:
102
+ :Max: '3400'
103
+ :Min: '3400'
104
+ :MarketRent:
105
+ :Max: '3400'
106
+ :Min: '3400'
107
+ :EffectiveRent:
108
+ :Max: '3400'
109
+ :Min: '3400'
110
+ :IDValue: SomethingRandom1
111
+ :ILS_Unit:
112
+ :Units:
113
+ :Unit:
114
+ :Identification:
115
+ :IDValue: SomethingRandom1
116
+ :OrganizationName: Roob Inc
117
+ :MarketingName: Cool New Apartment!!!!
118
+ :UnitBedrooms: '4'
119
+ :UnitBathrooms: '4.0'
120
+ :MinSquareFeet: '3400'
121
+ :MaxSquareFeet: '3400'
122
+ :SquareFootType: internal
123
+ :UnitRent: '3400.00'
124
+ :MarketRent: '3400.00'
125
+ :Address:
126
+ :AddressLine1: 123 Main St
127
+ :City: Santa Barbara
128
+ :PostalCode: '93003'
129
+ :Country: US
130
+ :AddressType: property
131
+ :Availability:
132
+ :VacateDate:
133
+ :Month: '3'
134
+ :Day: '20'
135
+ :Year: '2012'
136
+ :VacancyClass: Unoccupied
137
+ :MadeReadyDate:
138
+ :Month: '3'
139
+ :Day: '20'
140
+ :Year: '2012'
141
+ :Amenity:
142
+ - :Description: Refrigerator
143
+ :AmenityType: Refrigerator
144
+ - :Description: Range
145
+ :AmenityType: Range
146
+ - :Description: Built-In Microwave
147
+ :AmenityType: Microwave
148
+ - :Description: Built-In Dishwasher
149
+ :AmenityType: DishWasher
150
+ - :Description: Built-In Dishwasher
151
+ :AmenityType: Washer
152
+ - :Description: Garbage Disposal
153
+ :AmenityType: Disposal
154
+ - :Description: Stackable Washer/Dryer
155
+ :AmenityType: Dryer
156
+ - :Description: Stackable Washer/Dryer
157
+ :AmenityType: Washer
158
+ - :Description: Stainless steel appliances
159
+ :AmenityType: Other
160
+ - :Description: French Doors
161
+ :AmenityType: Other
162
+ - :Description: All appliances
163
+ :AmenityType: Other
164
+ - :Description: Landscaping included
165
+ :AmenityType: Other
166
+ - :Description: 2 Car Garage
167
+ :AmenityType: Garage
168
+ - :Description: Great Location
169
+ :AmenityType: Other
170
+ :IDValue: SomethingRandom1
171
+ :File:
172
+ - :FileType: Photo
173
+ :Description: Unit Photo
174
+ :Name: {}
175
+ :Caption: {}
176
+ :Format: image/jpg
177
+ :Src: http://douglaslebsack.name/triston_botsford
178
+ :Width: '0'
179
+ :Height: '0'
180
+ :Rank: '1'
181
+ :FileID: '46'
182
+ :Active: 'true'
183
+ - :FileType: Photo
184
+ :Description: Unit Photo
185
+ :Name: {}
186
+ :Caption: {}
187
+ :Format: image/jpg
188
+ :Src: http://vonbrown.com/wilhelmine.beatty
189
+ :Width: '0'
190
+ :Height: '0'
191
+ :Rank: '2'
192
+ :FileID: '47'
193
+ :Active: 'true'
194
+ - :FileType: Photo
195
+ :Description: Unit Photo
196
+ :Name: {}
197
+ :Caption: {}
198
+ :Format: image/jpg
199
+ :Src: http://cummings.biz/kaela
200
+ :Width: '0'
201
+ :Height: '0'
202
+ :Rank: '3'
203
+ :FileID: '48'
204
+ :Active: 'true'
205
+ :IDValue: SomethingRandom1
@@ -0,0 +1,23 @@
1
+ require 'spec_helper'
2
+
3
+ module MITS
4
+ describe Document do
5
+ subject { Document.new('./spec/fixtures/mits.xml') }
6
+
7
+ describe '#properties' do
8
+ it 'will return the properties' do
9
+ companies = subject.properties.reduce([]) { |arr, property| arr.push(property) }
10
+ expect(companies.first).to be_a Property
11
+ expect(companies.size).to eq 2
12
+ end
13
+ end
14
+
15
+ describe '#companies' do
16
+ it 'will return the companies' do
17
+ companies = subject.companies.reduce([]) { |arr, company| arr.push(company) }
18
+ expect(companies.first).to be_a Company
19
+ expect(companies.size).to eq 1
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,16 @@
1
+ require 'spec_helper'
2
+
3
+ module MITS
4
+ describe Address do
5
+ it { is_expected.to respond_to(:address1) }
6
+ it { is_expected.to respond_to(:address2) }
7
+ it { is_expected.to respond_to(:city) }
8
+ it { is_expected.to respond_to(:country) }
9
+ it { is_expected.to respond_to(:description) }
10
+ it { is_expected.to respond_to(:latitude) }
11
+ it { is_expected.to respond_to(:longitude) }
12
+ it { is_expected.to respond_to(:postal_code) }
13
+ it { is_expected.to respond_to(:state) }
14
+ it { is_expected.to respond_to(:type) }
15
+ end
16
+ end
@@ -0,0 +1,8 @@
1
+ require 'spec_helper'
2
+
3
+ module MITS
4
+ describe Amenity do
5
+ it { is_expected.to respond_to(:type) }
6
+ it { is_expected.to respond_to(:description) }
7
+ end
8
+ end
File without changes
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+
3
+ module MITS
4
+ describe Deposit do
5
+ it { is_expected.to respond_to(:type) }
6
+ it { is_expected.to respond_to(:description) }
7
+ it { is_expected.to respond_to(:percent_refundable) }
8
+ it { is_expected.to respond_to(:portion_refundable) }
9
+ it { is_expected.to respond_to(:amount) }
10
+ end
11
+ end
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ module MITS
4
+ describe Fees do
5
+ it { is_expected.to respond_to(:admin_fee) }
6
+ it { is_expected.to respond_to(:application_fee) }
7
+ it { is_expected.to respond_to(:broker_fee) }
8
+ it { is_expected.to respond_to(:late_fee_per_day) }
9
+ it { is_expected.to respond_to(:late_min_fee) }
10
+ it { is_expected.to respond_to(:late_percent) }
11
+ it { is_expected.to respond_to(:late_type) }
12
+ it { is_expected.to respond_to(:non_refundable_hold_fee) }
13
+ it { is_expected.to respond_to(:prorate_type) }
14
+ end
15
+ end