moxiworks_platform 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a2a814339155946906d80974370d8e8335aff15
|
4
|
+
data.tar.gz: b6db5eb3132f59317c65c6fe68566065ff8ac80f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d0886cc1acd4a873a14fec8cc96f129072f052fc0e86159e8416b4c7d43e1eaafedff48db1b88bfa33c0142bd0afbef9b6c25f1ae5140d28d7ac61629323bdd
|
7
|
+
data.tar.gz: 22f5ee37d8b37bc527d1d3c62ab377197cc409d913467448d274ef8587389de5b8f8a4c8029d2b55af7242b45e6a6d36e16649091b743c1e4ace8495845eb759
|
@@ -2,60 +2,153 @@ module MoxiworksPlatform
|
|
2
2
|
# = Moxi Works Platform Agent
|
3
3
|
class Agent < MoxiworksPlatform::Resource
|
4
4
|
|
5
|
+
# @!attribute moxi_works_agent_id
|
6
|
+
# moxi_works_agent_id is the Moxi Works Platform ID of the agent which a contact is
|
7
|
+
# or is to be associated with.
|
8
|
+
#
|
9
|
+
# this must be set for any Moxi Works Platform transaction
|
10
|
+
#
|
11
|
+
# @return [String] the Moxi Works Platform ID of the agent
|
5
12
|
attr_accessor :moxi_works_agent_id
|
6
13
|
|
14
|
+
# @!attribute mls
|
15
|
+
#
|
16
|
+
# @return [Array] containing strings representing the MLSs the agent is a member of
|
7
17
|
attr_accessor :mls
|
8
18
|
|
19
|
+
# @!attribute accreditation
|
20
|
+
#
|
21
|
+
# @return [String] containing any accreditation the agent has
|
9
22
|
attr_accessor :accreditation
|
10
23
|
|
24
|
+
# @!attribute address_street
|
25
|
+
#
|
26
|
+
# @return [String] the agent's address, street and number
|
11
27
|
attr_accessor :address_street
|
12
28
|
|
29
|
+
# @!attribute address_city
|
30
|
+
#
|
31
|
+
# @return [String] the agent's address, city
|
13
32
|
attr_accessor :address_city
|
14
33
|
|
34
|
+
# @!attribute address_state
|
35
|
+
#
|
36
|
+
# @return [String] the agent's address, state
|
15
37
|
attr_accessor :address_state
|
16
38
|
|
39
|
+
# @!attribute address_zip
|
40
|
+
#
|
41
|
+
# @return [String] the agent's address, zip code
|
17
42
|
attr_accessor :address_zip
|
18
43
|
|
44
|
+
# @!attribute office_address_street
|
45
|
+
#
|
46
|
+
# @return [String] the agent's office address, street and number
|
19
47
|
attr_accessor :office_address_street
|
20
48
|
|
49
|
+
# @!attribute office_address_city
|
50
|
+
#
|
51
|
+
# @return [String] the agent's office address, city
|
21
52
|
attr_accessor :office_address_city
|
22
53
|
|
54
|
+
# @!attribute office_address_state
|
55
|
+
#
|
56
|
+
# @return [String] the agent's office address, state
|
23
57
|
attr_accessor :office_address_state
|
24
58
|
|
59
|
+
# @!attribute office_address_zip
|
60
|
+
#
|
61
|
+
# @return [String] the agent's office address, zip code
|
25
62
|
attr_accessor :office_address_zip
|
26
63
|
|
64
|
+
# @!attribute name
|
65
|
+
#
|
66
|
+
# @return [String] the agent's full name
|
27
67
|
attr_accessor :name
|
28
68
|
|
69
|
+
# @!attribute license
|
70
|
+
#
|
71
|
+
# @return [String] the agent's license number
|
29
72
|
attr_accessor :license
|
30
73
|
|
74
|
+
# @!attribute mobile_phone_number
|
75
|
+
#
|
76
|
+
# @return [String] the agent's mobile phone number
|
31
77
|
attr_accessor :mobile_phone_number
|
32
78
|
|
79
|
+
# @!attribute home_phone_number
|
80
|
+
#
|
81
|
+
# @return [String] the agent's home phone number
|
33
82
|
attr_accessor :home_phone_number
|
34
83
|
|
84
|
+
# @!attribute mobile_phone_number
|
85
|
+
#
|
86
|
+
# @return [String] the agent's fax phone number
|
35
87
|
attr_accessor :fax_phone_number
|
36
88
|
|
89
|
+
# @!attribute main_phone_number
|
90
|
+
#
|
91
|
+
# @return [String] the agent's main phone number
|
37
92
|
attr_accessor :main_phone_number
|
38
93
|
|
94
|
+
# @!attribute office_phone_number
|
95
|
+
#
|
96
|
+
# @return [String] the agent's office_phone number
|
97
|
+
attr_accessor :office_phone_number
|
98
|
+
|
99
|
+
# @!attribute primary_email_address
|
100
|
+
#
|
101
|
+
# @return [String] the agent's primary email address
|
39
102
|
attr_accessor :primary_email_address
|
40
103
|
|
104
|
+
# @!attribute secondary_email_address
|
105
|
+
#
|
106
|
+
# @return [String] the agent's secondary email address
|
41
107
|
attr_accessor :secondary_email_address
|
42
108
|
|
109
|
+
# @!attribute languages
|
110
|
+
#
|
111
|
+
# @return [Array] an array of strings representing any languages the agent speaks
|
43
112
|
attr_accessor :languages
|
44
113
|
|
114
|
+
# @!attribute twitter
|
115
|
+
#
|
116
|
+
# @return [String] the agent's twitter handle
|
45
117
|
attr_accessor :twitter
|
46
118
|
|
119
|
+
# @!attribute google_plus
|
120
|
+
#
|
121
|
+
# @return [String] the agent's google plus acount
|
47
122
|
attr_accessor :google_plus
|
48
123
|
|
124
|
+
# @!attribute facebook
|
125
|
+
#
|
126
|
+
# @return [String] the agent's facebook page
|
49
127
|
attr_accessor :facebook
|
50
128
|
|
129
|
+
# @!attribute home_page
|
130
|
+
#
|
131
|
+
# @return [String] the agent's home page url
|
51
132
|
attr_accessor :home_page
|
52
133
|
|
134
|
+
# @!attribute primary_email_address
|
135
|
+
#
|
136
|
+
# @return [String] the agent's date of birth
|
53
137
|
attr_accessor :birth_date
|
54
138
|
|
139
|
+
# @!attribute title
|
140
|
+
#
|
141
|
+
# @return [String] the agent's title
|
55
142
|
attr_accessor :title
|
56
143
|
|
144
|
+
# @!attribute profile_image_url
|
145
|
+
#
|
146
|
+
# @return [String] url to a full size image of the agent
|
57
147
|
attr_accessor :profile_image_url
|
58
148
|
|
149
|
+
# @!attribute profile_thumb_url
|
150
|
+
#
|
151
|
+
# @return [String] url to a thumb size image of the agent
|
59
152
|
attr_accessor :profile_thumb_url
|
60
153
|
|
61
154
|
# Find an Agent on the Moxi Works Platform
|
@@ -68,7 +161,7 @@ module MoxiworksPlatform
|
|
68
161
|
# named parameters aren't included
|
69
162
|
#
|
70
163
|
def self.find(opts={})
|
71
|
-
url = "#{MoxiworksPlatform::Config.url}/api/agents/#{
|
164
|
+
url = "#{MoxiworksPlatform::Config.url}/api/agents/#{opts[:moxi_works_agent_id]}"
|
72
165
|
self.send_request(:get, opts, url)
|
73
166
|
end
|
74
167
|
|
@@ -434,7 +434,7 @@ module MoxiworksPlatform
|
|
434
434
|
# named parameters aren't included
|
435
435
|
#
|
436
436
|
def self.find(opts={})
|
437
|
-
url = "#{MoxiworksPlatform::Config.url}/api/contacts/#{
|
437
|
+
url = "#{MoxiworksPlatform::Config.url}/api/contacts/#{opts[:partner_contact_id]}"
|
438
438
|
self.send_request(:get, opts, url)
|
439
439
|
end
|
440
440
|
|
@@ -566,7 +566,7 @@ module MoxiworksPlatform
|
|
566
566
|
#
|
567
567
|
def self.update(opts={})
|
568
568
|
opts[:contact_id] = opts[:partner_contact_id]
|
569
|
-
url = "#{MoxiworksPlatform::Config.url}/api/contacts/#{
|
569
|
+
url = "#{MoxiworksPlatform::Config.url}/api/contacts/#{opts[:partner_contact_id]}"
|
570
570
|
self.send_request(:put, opts, url)
|
571
571
|
end
|
572
572
|
|
@@ -587,7 +587,7 @@ module MoxiworksPlatform
|
|
587
587
|
# success = MoxiWorksPlatform::Contact.delete(moxi_works_agent_id: '123abcd', partner_contact_id: 'myUniqueContactId' )
|
588
588
|
#
|
589
589
|
def self.delete(opts={})
|
590
|
-
url = "#{MoxiworksPlatform::Config.url}/api/contacts/#{
|
590
|
+
url = "#{MoxiworksPlatform::Config.url}/api/contacts/#{opts[:partner_contact_id]}"
|
591
591
|
required_opts = [:moxi_works_agent_id, :partner_contact_id]
|
592
592
|
required_opts.each do |opt|
|
593
593
|
raise ::MoxiworksPlatform::Exception::ArgumentError, "#{opt} required" if
|
@@ -74,19 +74,6 @@ module MoxiworksPlatform
|
|
74
74
|
not json['status'].nil? and (%w(error fail).include?(json['status']))
|
75
75
|
end
|
76
76
|
|
77
|
-
# modify an external ID so that it's fetchable via URL.
|
78
|
-
#
|
79
|
-
# IDs that contain things like dots cause problems when attempting to fetch resources
|
80
|
-
# that use those IDs as primary keys when fetching via RESTful routes
|
81
|
-
# this method converts stuff that isn't handled well, ensuring that we have a uniform
|
82
|
-
# ID and ensuring that those IDs are usable via URL.
|
83
|
-
#
|
84
|
-
# @param [String] an ID to be converted into a URL ready ID
|
85
|
-
#
|
86
|
-
# @return [String] the ID with all the bad stuff converted into URL ready stuff
|
87
|
-
def self.safe_id(id)
|
88
|
-
Base64.urlsafe_encode64(id)
|
89
|
-
end
|
90
77
|
|
91
78
|
# maps Hash values to Instance variables for mapping JSON object values to our Class attributes
|
92
79
|
#
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moxiworks_platform
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tres Wong-Godfrey
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|