File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 24
24
require 'spark_api/models/open_house'
25
25
require 'spark_api/models/photo'
26
26
require 'spark_api/models/portal'
27
+ require 'spark_api/models/portal_listing_cart'
27
28
require 'spark_api/models/property_types'
28
29
require 'spark_api/models/rental_calendar'
29
30
require 'spark_api/models/saved_search'
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ def Name=(name)
20
20
write_attribute ( "Name" , name )
21
21
end
22
22
23
- def path
23
+ def self . path
24
24
if @contact_id
25
25
"/contacts/#{ @contact_id } /listingcarts"
26
26
else
@@ -35,7 +35,7 @@ def filter
35
35
def listings ( args = { } )
36
36
return [ ] if attributes [ "ListingIds" ] . nil?
37
37
arguments = { :_filter => self . filter } . merge ( args )
38
- Listing . collect ( connection . get ( "/listingcarts /#{ self . Id } /listings" , arguments ) )
38
+ Listing . collect ( connection . get ( "#{ self . path } /#{ self . Id } /listings" , arguments ) )
39
39
end
40
40
41
41
def add_listing ( listing )
Original file line number Diff line number Diff line change
1
+ module SparkApi
2
+ module Models
3
+
4
+ class PortalListingCart < ListingCart
5
+
6
+ def self . find ( contact_id , *arguments )
7
+ @contact_id = contact_id
8
+ super ( *arguments )
9
+ end
10
+
11
+ end
12
+ end
13
+ end
You can’t perform that action at this time.
0 commit comments