simplyrets 0.1

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.
@@ -0,0 +1,43 @@
1
+ class GeographicData
2
+ attr_accessor :county, :lat, :lng, :market_area, :directions
3
+
4
+ # :internal => :external
5
+ def self.attribute_map
6
+ {
7
+ :county => :county,
8
+ :lat => :lat,
9
+ :lng => :lng,
10
+ :market_area => :marketArea,
11
+ :directions => :directions
12
+
13
+ }
14
+ end
15
+
16
+ def initialize(attributes = {})
17
+ return if attributes.empty?
18
+ # Morph attribute keys into undescored rubyish style
19
+ if self.class.attribute_map[:"county"]
20
+ @county = attributes["county"]
21
+ end
22
+ if self.class.attribute_map[:"lat"]
23
+ @lat = attributes["lat"]
24
+ end
25
+ if self.class.attribute_map[:"lng"]
26
+ @lng = attributes["lng"]
27
+ end
28
+ if self.class.attribute_map[:"market_area"]
29
+ @market_area = attributes["marketArea"]
30
+ end
31
+ if self.class.attribute_map[:"directions"]
32
+ @directions = attributes["directions"]
33
+ end
34
+ end
35
+
36
+ def to_body
37
+ body = {}
38
+ self.class.attribute_map.each_pair do |key, value|
39
+ body[value] = self.send(key) unless self.send(key).nil?
40
+ end
41
+ body
42
+ end
43
+ end
data/models/listing.rb ADDED
@@ -0,0 +1,95 @@
1
+ class Listing
2
+ attr_accessor :property, :mls_id, :showing_instructions, :office, :disclaimer, :address, :list_date, :agent, :modified, :school, :photos, :list_price, :listing_id, :mls, :geo, :tax, :remarks
3
+
4
+ # :internal => :external
5
+ def self.attribute_map
6
+ {
7
+ :property => :property,
8
+ :mls_id => :mlsId,
9
+ :showing_instructions => :showingInstructions,
10
+ :office => :office,
11
+ :disclaimer => :disclaimer,
12
+ :address => :address,
13
+ :list_date => :listDate,
14
+ :agent => :agent,
15
+ :modified => :modified,
16
+ :school => :school,
17
+ :photos => :photos,
18
+ :list_price => :listPrice,
19
+ :listing_id => :listingId,
20
+ :mls => :mls,
21
+ :geo => :geo,
22
+ :tax => :tax,
23
+ :remarks => :remarks
24
+
25
+ }
26
+ end
27
+
28
+ def initialize(attributes = {})
29
+ return if attributes.empty?
30
+ # Morph attribute keys into undescored rubyish style
31
+ if self.class.attribute_map[:"property"]
32
+ @property = attributes["property"]
33
+ end
34
+ if self.class.attribute_map[:"mls_id"]
35
+ @mls_id = attributes["mlsId"]
36
+ end
37
+ if self.class.attribute_map[:"showing_instructions"]
38
+ @showing_instructions = attributes["showingInstructions"]
39
+ end
40
+ if self.class.attribute_map[:"office"]
41
+ @office = attributes["office"]
42
+ end
43
+ if self.class.attribute_map[:"disclaimer"]
44
+ @disclaimer = attributes["disclaimer"]
45
+ end
46
+ if self.class.attribute_map[:"address"]
47
+ @address = attributes["address"]
48
+ end
49
+ if self.class.attribute_map[:"list_date"]
50
+ @list_date = attributes["listDate"]
51
+ end
52
+ if self.class.attribute_map[:"agent"]
53
+ @agent = attributes["agent"]
54
+ end
55
+ if self.class.attribute_map[:"modified"]
56
+ @modified = attributes["modified"]
57
+ end
58
+ if self.class.attribute_map[:"school"]
59
+ @school = attributes["school"]
60
+ end
61
+ if self.class.attribute_map[:"photos"]
62
+ if (value = attributes["photos"]).is_a?(Array)
63
+ @photos = value
64
+
65
+ end
66
+ end
67
+ if self.class.attribute_map[:"list_price"]
68
+ @list_price = attributes["listPrice"]
69
+ end
70
+ if self.class.attribute_map[:"listing_id"]
71
+ @listing_id = attributes["listingId"]
72
+ end
73
+ if self.class.attribute_map[:"mls"]
74
+ @mls = attributes["mls"]
75
+ end
76
+ if self.class.attribute_map[:"geo"]
77
+ @geo = attributes["geo"]
78
+ end
79
+ if self.class.attribute_map[:"tax"]
80
+ @tax = attributes["tax"]
81
+ end
82
+ if self.class.attribute_map[:"remarks"]
83
+ @remarks = attributes["remarks"]
84
+ end
85
+
86
+ end
87
+
88
+ def to_body
89
+ body = {}
90
+ self.class.attribute_map.each_pair do |key, value|
91
+ body[value] = self.send(key) unless self.send(key).nil?
92
+ end
93
+ body
94
+ end
95
+ end
@@ -0,0 +1,35 @@
1
+ class MlsInformation
2
+ attr_accessor :status, :area, :days_on_market
3
+
4
+ # :internal => :external
5
+ def self.attribute_map
6
+ {
7
+ :status => :status,
8
+ :area => :area,
9
+ :days_on_market => :daysOnMarket
10
+
11
+ }
12
+ end
13
+
14
+ def initialize(attributes = {})
15
+ return if attributes.empty?
16
+ # Morph attribute keys into undescored rubyish style
17
+ if self.class.attribute_map[:"status"]
18
+ @status = attributes["status"]
19
+ end
20
+ if self.class.attribute_map[:"area"]
21
+ @area = attributes["area"]
22
+ end
23
+ if self.class.attribute_map[:"days_on_market"]
24
+ @days_on_market = attributes["daysOnMarket"]
25
+ end
26
+ end
27
+
28
+ def to_body
29
+ body = {}
30
+ self.class.attribute_map.each_pair do |key, value|
31
+ body[value] = self.send(key) unless self.send(key).nil?
32
+ end
33
+ body
34
+ end
35
+ end
data/models/office.rb ADDED
@@ -0,0 +1,39 @@
1
+ class Office
2
+ attr_accessor :contact, :name, :serving_name, :brokerid
3
+
4
+ # :internal => :external
5
+ def self.attribute_map
6
+ {
7
+ :contact => :contact,
8
+ :name => :name,
9
+ :serving_name => :servingName,
10
+ :brokerid => :brokerid
11
+
12
+ }
13
+ end
14
+
15
+ def initialize(attributes = {})
16
+ return if attributes.empty?
17
+ # Morph attribute keys into undescored rubyish style
18
+ if self.class.attribute_map[:"contact"]
19
+ @contact = attributes["contact"]
20
+ end
21
+ if self.class.attribute_map[:"name"]
22
+ @name = attributes["name"]
23
+ end
24
+ if self.class.attribute_map[:"serving_name"]
25
+ @serving_name = attributes["servingName"]
26
+ end
27
+ if self.class.attribute_map[:"brokerid"]
28
+ @brokerid = attributes["brokerid"]
29
+ end
30
+ end
31
+
32
+ def to_body
33
+ body = {}
34
+ self.class.attribute_map.each_pair do |key, value|
35
+ body[value] = self.send(key) unless self.send(key).nil?
36
+ end
37
+ body
38
+ end
39
+ end
@@ -0,0 +1,84 @@
1
+ class Property
2
+ attr_accessor :roof, :style, :area, :baths_full, :baths_half, :stories, :fireplaces, :heating, :bedrooms, :interior_features, :lot_size, :exterior_features, :subdivision, :type, :year_built
3
+
4
+ # :internal => :external
5
+ def self.attribute_map
6
+ {
7
+ :roof => :roof,
8
+ :style => :style,
9
+ :area => :area,
10
+ :baths_full => :bathsFull,
11
+ :baths_half => :bathsHalf,
12
+ :stories => :stories,
13
+ :fireplaces => :fireplaces,
14
+ :heating => :heating,
15
+ :bedrooms => :bedrooms,
16
+ :interior_features => :interiorFeatures,
17
+ :lot_size => :lotSize,
18
+ :exterior_features => :exteriorFeatures,
19
+ :subdivision => :subdivision,
20
+ :type => :type,
21
+ :year_built => :yearBuilt
22
+
23
+ }
24
+ end
25
+
26
+ def initialize(attributes = {})
27
+ return if attributes.empty?
28
+ # Morph attribute keys into undescored rubyish style
29
+ if self.class.attribute_map[:"roof"]
30
+ @roof = attributes["roof"]
31
+ end
32
+ if self.class.attribute_map[:"style"]
33
+ @style = attributes["style"]
34
+ end
35
+ if self.class.attribute_map[:"area"]
36
+ @area = attributes["area"]
37
+ end
38
+ if self.class.attribute_map[:"baths_full"]
39
+ @baths_full = attributes["bathsFull"]
40
+ end
41
+ if self.class.attribute_map[:"baths_half"]
42
+ @baths_half = attributes["bathsHalf"]
43
+ end
44
+ if self.class.attribute_map[:"stories"]
45
+ @stories = attributes["stories"]
46
+ end
47
+ if self.class.attribute_map[:"fireplaces"]
48
+ @fireplaces = attributes["fireplaces"]
49
+ end
50
+ if self.class.attribute_map[:"heating"]
51
+ @heating = attributes["heating"]
52
+ end
53
+ if self.class.attribute_map[:"bedrooms"]
54
+ @bedrooms = attributes["bedrooms"]
55
+ end
56
+ if self.class.attribute_map[:"interior_features"]
57
+ @interior_features = attributes["interiorFeatures"]
58
+ end
59
+ if self.class.attribute_map[:"lot_size"]
60
+ @lot_size = attributes["lotSize"]
61
+ end
62
+ if self.class.attribute_map[:"exterior_features"]
63
+ @exterior_features = attributes["exteriorFeatures"]
64
+ end
65
+ if self.class.attribute_map[:"subdivision"]
66
+ @subdivision = attributes["subdivision"]
67
+ end
68
+ if self.class.attribute_map[:"type"]
69
+ @type = attributes["type"]
70
+ end
71
+ if self.class.attribute_map[:"year_built"]
72
+ @year_built = attributes["yearBuilt"]
73
+ end
74
+
75
+ end
76
+
77
+ def to_body
78
+ body = {}
79
+ self.class.attribute_map.each_pair do |key, value|
80
+ body[value] = self.send(key) unless self.send(key).nil?
81
+ end
82
+ body
83
+ end
84
+ end
data/models/school.rb ADDED
@@ -0,0 +1,27 @@
1
+ class School
2
+ attr_accessor :district
3
+
4
+ # :internal => :external
5
+ def self.attribute_map
6
+ {
7
+ :district => :district
8
+
9
+ }
10
+ end
11
+
12
+ def initialize(attributes = {})
13
+ return if attributes.empty?
14
+ # Morph attribute keys into undescored rubyish style
15
+ if self.class.attribute_map[:"district"]
16
+ @district = attributes["district"]
17
+ end
18
+ end
19
+
20
+ def to_body
21
+ body = {}
22
+ self.class.attribute_map.each_pair do |key, value|
23
+ body[value] = self.send(key) unless self.send(key).nil?
24
+ end
25
+ body
26
+ end
27
+ end
@@ -0,0 +1,47 @@
1
+ class StreetAddress
2
+ attr_accessor :country, :postal_code, :street_name, :city, :street_number, :full
3
+
4
+ # :internal => :external
5
+ def self.attribute_map
6
+ {
7
+ :country => :country,
8
+ :postal_code => :postalCode,
9
+ :street_name => :streetName,
10
+ :city => :city,
11
+ :street_number => :streetNumber,
12
+ :full => :full
13
+
14
+ }
15
+ end
16
+
17
+ def initialize(attributes = {})
18
+ return if attributes.empty?
19
+ # Morph attribute keys into undescored rubyish style
20
+ if self.class.attribute_map[:"country"]
21
+ @country = attributes["country"]
22
+ end
23
+ if self.class.attribute_map[:"postal_code"]
24
+ @postal_code = attributes["postalCode"]
25
+ end
26
+ if self.class.attribute_map[:"street_name"]
27
+ @street_name = attributes["streetName"]
28
+ end
29
+ if self.class.attribute_map[:"city"]
30
+ @city = attributes["city"]
31
+ end
32
+ if self.class.attribute_map[:"street_number"]
33
+ @street_number = attributes["streetNumber"]
34
+ end
35
+ if self.class.attribute_map[:"full"]
36
+ @full = attributes["full"]
37
+ end
38
+ end
39
+
40
+ def to_body
41
+ body = {}
42
+ self.class.attribute_map.each_pair do |key, value|
43
+ body[value] = self.send(key) unless self.send(key).nil?
44
+ end
45
+ body
46
+ end
47
+ end
data/models/tax.rb ADDED
@@ -0,0 +1,28 @@
1
+ class Tax
2
+ attr_accessor :id
3
+
4
+ # :internal => :external
5
+ def self.attribute_map
6
+ {
7
+ :id => :id
8
+
9
+ }
10
+ end
11
+
12
+ def initialize(attributes = {})
13
+ return if attributes.empty?
14
+ # Morph attribute keys into undescored rubyish style
15
+ if self.class.attribute_map[:"id"]
16
+ @id = attributes["id"]
17
+ end
18
+
19
+ end
20
+
21
+ def to_body
22
+ body = {}
23
+ self.class.attribute_map.each_pair do |key, value|
24
+ body[value] = self.send(key) unless self.send(key).nil?
25
+ end
26
+ body
27
+ end
28
+ end
Binary file
@@ -0,0 +1,25 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ $:.push File.expand_path("../models", __FILE__)
4
+ require "simplyrets/version"
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "simplyrets"
8
+ s.version = SimplyRets::VERSION
9
+ s.platform = Gem::Platform::RUBY
10
+ s.authors = ["Christopher Reichert", "Cody Reichert"]
11
+ s.email = ["christopher@simplyrets.com", "cody@simplyrets.com"]
12
+ s.homepage = "https://simplyrets.com"
13
+ s.summary = %q{SimplyRETS Ruby SDK}
14
+ s.description = %q{This gem provides a SimplyRETS SDK for creating real estate software with RETS data}
15
+
16
+ s.add_dependency 'typhoeus', '>=0.2.1'
17
+ s.add_dependency 'addressable', '>=2.3.4'
18
+ s.add_dependency 'json', '>=1.8'
19
+
20
+ s.add_development_dependency 'rake'
21
+ s.add_development_dependency 'bundler'
22
+
23
+ s.files = `find *`.split("\n").uniq.sort.select{|f| !f.empty? }
24
+ s.require_paths = ["lib", "models"]
25
+ end
metadata ADDED
@@ -0,0 +1,144 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: simplyrets
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.1'
5
+ platform: ruby
6
+ authors:
7
+ - Christopher Reichert
8
+ - Cody Reichert
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2015-03-23 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: typhoeus
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: 0.2.1
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ version: 0.2.1
28
+ - !ruby/object:Gem::Dependency
29
+ name: addressable
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: 2.3.4
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: 2.3.4
42
+ - !ruby/object:Gem::Dependency
43
+ name: json
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: '1.8'
49
+ type: :runtime
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: '1.8'
56
+ - !ruby/object:Gem::Dependency
57
+ name: rake
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: bundler
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ description: This gem provides a SimplyRETS SDK for creating real estate software
85
+ with RETS data
86
+ email:
87
+ - christopher@simplyrets.com
88
+ - cody@simplyrets.com
89
+ executables: []
90
+ extensions: []
91
+ extra_rdoc_files: []
92
+ files:
93
+ - "#example.rb#"
94
+ - Gemfile
95
+ - Gemfile.lock
96
+ - LICENSE
97
+ - README.org
98
+ - Rakefile
99
+ - example.rb
100
+ - lib/monkey.rb
101
+ - lib/properties_api.rb
102
+ - lib/simplyrets.rb
103
+ - lib/simplyrets.rb~
104
+ - lib/simplyrets/configuration.rb
105
+ - lib/simplyrets/request.rb
106
+ - lib/simplyrets/response.rb
107
+ - lib/simplyrets/version.rb
108
+ - models/agent.rb
109
+ - models/contactinformation.rb
110
+ - models/geographicdata.rb
111
+ - models/listing.rb
112
+ - models/mlsinformation.rb
113
+ - models/office.rb
114
+ - models/property.rb
115
+ - models/school.rb
116
+ - models/streetaddress.rb
117
+ - models/tax.rb
118
+ - pkg/simplyrets-0.1.gem
119
+ - simplyrets.gemspec
120
+ homepage: https://simplyrets.com
121
+ licenses: []
122
+ metadata: {}
123
+ post_install_message:
124
+ rdoc_options: []
125
+ require_paths:
126
+ - lib
127
+ - models
128
+ required_ruby_version: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ required_rubygems_version: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ version: '0'
138
+ requirements: []
139
+ rubyforge_project:
140
+ rubygems_version: 2.2.2
141
+ signing_key:
142
+ specification_version: 4
143
+ summary: SimplyRETS Ruby SDK
144
+ test_files: []