promoter 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 34ba1543f397687aaf890f45ee5c8f1fddce0cfc78208dd452c5aecea7f20315
4
- data.tar.gz: 1c804776dca6b580ab6cd9f99bf1e0f5ed3aa279706fc82032f75d43af1e0a31
3
+ metadata.gz: b6b449ab67dcd2314d2a48d975c6b7299442f8f150763542551e6aa85bf44921
4
+ data.tar.gz: cfbd5df5321613ff80d9bb0c727bbcd318e640aa27ecdb9b12f4def873632efc
5
5
  SHA512:
6
- metadata.gz: e503a96456e5b28f1a131308d00f47c598c2d37cb1329bd09eaf76507254bd228220c223a2cd2754b6e85c3f6ebc108e7dbd89ab4ed3f48d7af5cebb69711cc4
7
- data.tar.gz: c9e0773d845101987e0eab4b0662c1760f01d590906a2b3e01841978ea82a99f84d453c3c244e9ccab3d4d0e49bede91ed5ab715426cd1e2f12310fbb30c6d9a
6
+ metadata.gz: 223c9a33bc756eff26ea6293baf19087cd3098b6138023d55fd779ee65eafedd6ba4fc71084e2292b7d7a15d079b0d1a4af78f92dea81a04e859b4f83c6c4bd1
7
+ data.tar.gz: 776d610e56c96a11ccad14eee44c79eef2e53e4abe68480d68f3e3a6c93c1bb8903b2d9f2b54c89983b59f9929294c0d8fe09f94e357fc9ad7df04b94d445508
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module Promoter
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: promoter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris O'Sullivan