Class: Profile::Rating
- Inherits:
-
Object
- Object
- Profile::Rating
- Defined in:
- lib/profile.rb
Instance Method Summary collapse
-
#initialize(clientw) ⇒ Rating
constructor
A new instance of Rating.
- #set(options) ⇒ Object
Constructor Details
#initialize(clientw) ⇒ Rating
Returns a new instance of Rating.
182 183 184 |
# File 'lib/profile.rb', line 182 def initialize(clientw) @clientw = clientw end |
Instance Method Details
#set(options) ⇒ Object
186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/profile.rb', line 186 def set() payload = { "source_id" => ['source_id'], "rating" => ["rating"] } payload = ReqUtils.add_if_not_blank(payload, 'profile_id', ['profile_id']) payload = ReqUtils.add_if_not_blank(payload, 'profile_reference', ['profile_reference']) payload = ReqUtils.add_if_not_blank(payload, 'filter_id', ['filter_id']) payload = ReqUtils.add_if_not_blank(payload, 'filter_reference', ['filter_reference']) resp = @clientw.patch("profile/rating", payload) return resp['data'] end |