promoter 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/promoter/contact.rb +12 -0
- data/lib/promoter/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6b449ab67dcd2314d2a48d975c6b7299442f8f150763542551e6aa85bf44921
|
4
|
+
data.tar.gz: cfbd5df5321613ff80d9bb0c727bbcd318e640aa27ecdb9b12f4def873632efc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 223c9a33bc756eff26ea6293baf19087cd3098b6138023d55fd779ee65eafedd6ba4fc71084e2292b7d7a15d079b0d1a4af78f92dea81a04e859b4f83c6c4bd1
|
7
|
+
data.tar.gz: 776d610e56c96a11ccad14eee44c79eef2e53e4abe68480d68f3e3a6c93c1bb8903b2d9f2b54c89983b59f9929294c0d8fe09f94e357fc9ad7df04b94d445508
|
data/lib/promoter/contact.rb
CHANGED
@@ -88,7 +88,19 @@ module Promoter
|
|
88
88
|
def self.survey(params)
|
89
89
|
contact_attributes = if Promoter.api_version == 2
|
90
90
|
api_url = "https://app.promoter.io/api/v2"
|
91
|
+
contact_params = {
|
92
|
+
attributes: params[:attributes],
|
93
|
+
email: params[:email],
|
94
|
+
first_name: params[:first_name],
|
95
|
+
last_name: params[:last_name]
|
96
|
+
}
|
97
|
+
survey_params = {
|
98
|
+
attributes: params[:survey_attributes],
|
99
|
+
campaign_id: params[:campaign_id],
|
100
|
+
contact: contact_params,
|
101
|
+
}
|
91
102
|
response = Request.post(api_url + "/survey/", params)
|
103
|
+
|
92
104
|
response["contact"]
|
93
105
|
else
|
94
106
|
Request.post(API_URL + "/survey/", params)
|
data/lib/promoter/version.rb
CHANGED