Skip to content

Commit 9f47706

Browse files
committed
Add with region
1 parent a5e6faf commit 9f47706

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/optimizely/event/entity/event_batch.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@ def as_json
2929
client_version: @client_version,
3030
anonymize_ip: @anonymize_ip,
3131
enrich_decisions: @enrich_decisions,
32-
visitors: @visitors
32+
visitors: @visitors,
33+
region: @region
3334
}
3435
end
3536

3637
class Builder
3738
attr_reader :account_id, :project_id, :revision, :client_name, :client_version,
38-
:anonymize_ip, :enrich_decisions, :visitors
39+
:anonymize_ip, :enrich_decisions, :visitors, :region
3940

4041
def build
4142
event_batch = EventBatch.new
@@ -47,6 +48,7 @@ def build
4748
event_batch.anonymize_ip = @anonymize_ip
4849
event_batch.enrich_decisions = @enrich_decisions
4950
event_batch.visitors = @visitors
51+
event_batch.region = @region
5052
event_batch
5153
end
5254

@@ -62,6 +64,10 @@ def with_revision(revision)
6264
@revision = revision
6365
end
6466

67+
def region(region)
68+
@region = region
69+
end
70+
6571
def with_client_name(client_name)
6672
@client_name = client_name
6773
end

0 commit comments

Comments
 (0)