90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
# File 'lib/gooddata/models/client.rb', line 90
def update_setting(name, value, opts = {})
return nil unless value
domain = opts[:domain]
client_id = opts[:client_id]
data_product_id = opts[:data_product_id]
uri = data_product_id ? GoodData::DataProduct::ONE_DATA_PRODUCT_PATH % { domain_name: domain.name, id: data_product_id } : domain.segments_uri
body = {
setting: {
name: "#{name}",
value: "#{value}"
}
}
domain.client.put(uri + "/clients/#{client_id}/settings/#{name}", body)
nil
end
|