Skip to content

Commit 331c0b1

Browse files
committed
Implement
1 parent b5aab91 commit 331c0b1

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

lib/optimizely/event/entity/event_batch.rb

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
module Optimizely
1919
class EventBatch
2020
attr_accessor :account_id, :project_id, :revision, :client_name, :client_version,
21-
:anonymize_ip, :enrich_decisions, :visitors, :region
21+
:anonymize_ip, :enrich_decisions, :visitors
2222

2323
def as_json
2424
{
@@ -29,14 +29,13 @@ def as_json
2929
client_version: @client_version,
3030
anonymize_ip: @anonymize_ip,
3131
enrich_decisions: @enrich_decisions,
32-
visitors: @visitors,
33-
region: @region
32+
visitors: @visitors
3433
}
3534
end
3635

3736
class Builder
3837
attr_reader :account_id, :project_id, :revision, :client_name, :client_version,
39-
:anonymize_ip, :enrich_decisions, :visitors, :region
38+
:anonymize_ip, :enrich_decisions, :visitors
4039

4140
def build
4241
event_batch = EventBatch.new
@@ -48,7 +47,6 @@ def build
4847
event_batch.anonymize_ip = @anonymize_ip
4948
event_batch.enrich_decisions = @enrich_decisions
5049
event_batch.visitors = @visitors
51-
event_batch.region = @region || 'US'
5250
event_batch
5351
end
5452

@@ -64,10 +62,6 @@ def with_revision(revision)
6462
@revision = revision
6563
end
6664

67-
def with_region(region)
68-
@region = region || 'US'
69-
end
70-
7165
def with_client_name(client_name)
7266
@client_name = client_name
7367
end

lib/optimizely/event/event_factory.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ def create_log_event(user_events, logger)
6767
builder.with_client_name(user_context[:client_name])
6868
builder.with_anonymize_ip(user_context[:anonymize_ip])
6969
builder.with_enrich_decisions(true)
70-
builder.with_region(user_context[:region])
7170

7271
builder.with_visitors(visitors)
7372
event_batch = builder.build

0 commit comments

Comments
 (0)