lib/3scale/client.rb in 3scale_client-2.6.1 vs lib/3scale/client.rb in 3scale_client-2.7.0
- old
+ new
@@ -247,10 +247,11 @@
private
OAUTH_PARAMS = [:app_id, :app_key, :service_id, :redirect_url]
ALL_PARAMS = [:user_key, :app_id, :app_key, :service_id, :redirect_url]
+ REPORT_PARAMS = [:user_key, :app_id, :service_id, :timestamp]
def options_to_params(options, allowed_keys)
params = { :provider_key => provider_key }
allowed_keys.each do |key|
@@ -266,12 +267,12 @@
def encode_transactions(transactions)
result = {}
transactions.each_with_index do |transaction, index|
- append_value(result, index, [:app_id], transaction[:app_id])
- append_value(result, index, [:timestamp], transaction[:timestamp])
- append_value(result, index, [:client_ip], transaction[:client_ip])
+ REPORT_PARAMS.each do |param|
+ append_value(result, index, [param], transaction[param])
+ end
transaction[:usage].each do |name, value|
append_value(result, index, [:usage, name], value)
end