Class: Profile::Stage

Inherits:
Object
  • Object
show all
Defined in:
lib/profile.rb

Instance Method Summary collapse

Constructor Details

#initialize(clientw) ⇒ Stage

Returns a new instance of Stage.



162
163
164
# File 'lib/profile.rb', line 162

def initialize(clientw)
    @clientw = clientw
end

Instance Method Details

#set(options) ⇒ Object



166
167
168
169
170
171
172
173
174
175
176
177
# File 'lib/profile.rb', line 166

def set(options)
    payload = {
        "source_id" => options['source_id'],
        "stage" => options["stage"]
    }
    payload = ReqUtils.add_if_not_blank(payload, 'profile_id', options['profile_id'])
    payload = ReqUtils.add_if_not_blank(payload, 'profile_reference', options['profile_reference'])
    payload = ReqUtils.add_if_not_blank(payload, 'filter_id', options['filter_id'])
    payload = ReqUtils.add_if_not_blank(payload, 'filter_reference', options['filter_reference'])
    resp = @clientw.patch("profile/stage", payload)
    return resp['data']
end