Skip to content

Commit 0a97fe2

Browse files
Merge pull request #74 from SiftScience/API-6558
API-6558: Added return_route_info query param
2 parents 1d88a66 + c646680 commit 0a97fe2

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

HISTORY

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
=== 4.1.0 2022-06-22
2+
- Add return_route_info query param
3+
14
=== 4.0.0 2019-05-15
25
- Breaking change: Propagate exception in Client.track() – previously we were silently swallowing exceptions and now we are bubbling them up. You will need to add exception handling code.
36
- Fix URL encoding

lib/sift/client.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ def track(event, properties = {}, opts = {})
216216
return_score = opts[:return_score]
217217
return_action = opts[:return_action]
218218
return_workflow_status = opts[:return_workflow_status]
219+
return_route_info = opts[:return_route_info]
219220
force_workflow_run = opts[:force_workflow_run]
220221
abuse_types = opts[:abuse_types]
221222

@@ -227,6 +228,7 @@ def track(event, properties = {}, opts = {})
227228
query["return_score"] = "true" if return_score
228229
query["return_action"] = "true" if return_action
229230
query["return_workflow_status"] = "true" if return_workflow_status
231+
query["return_route_info"] = "true" if return_route_info
230232
query["force_workflow_run"] = "true" if force_workflow_run
231233
query["abuse_types"] = abuse_types.join(",") if abuse_types
232234

lib/sift/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module Sift
2-
VERSION = "4.0.0"
2+
VERSION = "4.1.0"
33
API_VERSION = "205"
44
end

spec/unit/client_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ def fully_qualified_api_endpoint
469469
}
470470

471471
stub_request(:post,
472-
"https://api.siftscience.com/v205/events?return_workflow_status=true&abuse_types=legacy,payment_abuse")
472+
"https://api.siftscience.com/v205/events?return_workflow_status=true&return_route_info=true&abuse_types=legacy,payment_abuse")
473473
.to_return(:status => 200, :body => MultiJson.dump(response_json),
474474
:headers => {"content-type"=>"application/json; charset=UTF-8",
475475
"content-length"=> "74"})
@@ -478,7 +478,8 @@ def fully_qualified_api_endpoint
478478
properties = valid_transaction_properties
479479
response = Sift::Client.new(:api_key => api_key)
480480
.track(event, properties,
481-
:return_workflow_status => true, :abuse_types => ['legacy', 'payment_abuse'])
481+
:return_workflow_status => true, :return_route_info => true,
482+
:abuse_types => ['legacy', 'payment_abuse'])
482483
expect(response.ok?).to eq(true)
483484
expect(response.api_status).to eq(0)
484485
expect(response.api_error_message).to eq("OK")

0 commit comments

Comments
 (0)