qualtrics_api 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f99dbc6dfa6842ea514f22148e7c87fb8b183414
4
- data.tar.gz: d6778d2aadd24c5ed9bb93e7b2de9f829228bbf8
3
+ metadata.gz: 3989bd675ef7fdd3d656332a25415f2531ab8d0d
4
+ data.tar.gz: 6ac2c42f3b7243b0a5079eb693c085793b9d7bc2
5
5
  SHA512:
6
- metadata.gz: b706a1e3f81b142307c87b7cf650c6a58797831451abc67609ded2fa0f9db158688348d0adc4ba678e60db265caee228d42364265fdc857d0bde6054fa8d139b
7
- data.tar.gz: 096263c96a01bc162753b1c4bed1c1122c789f9efd795348b415850500cf2160e54b1dc7a7f599f2b3806a3061981356f52fb5d09bcbb285e0388c08452edc5f
6
+ metadata.gz: 99b339083e65224cd22f62bf3aa23ee391e96443b2d8dbf94525e6f81159fd612974babf7f54fcdfa0af97b75604215069b56715e63f41588ecab7c578889979
7
+ data.tar.gz: d70be5772c5612bbab692aafc34a150a971a6dbfd6f25e50eb63fd2549a345649c6d70760a697cb76434aac58d9c4c6c7ad4692682bf94ef745e1f82852dce94
@@ -6,7 +6,7 @@ module QualtricsAPI
6
6
  attribute :email, String
7
7
  attribute :language, String
8
8
  attribute :unsubscribed, Integer
9
- attribute :external_data_reference, String
9
+ attribute :external_reference, String
10
10
  attribute :embeded_data, Hash
11
11
 
12
12
  def to_json(_options = {})
@@ -29,10 +29,10 @@ module QualtricsAPI
29
29
 
30
30
  def attributes_mappings
31
31
  {
32
- :id => "panelMemberId",
32
+ :id => "recipientID",
33
33
  :first_name => "firstName",
34
34
  :last_name => "lastName",
35
- :external_data_reference => "externalDataReference",
35
+ :external_reference => "externalReference",
36
36
  :embeded_data => "embeddedData"
37
37
  }
38
38
  end
@@ -1,3 +1,3 @@
1
1
  module QualtricsAPI
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -6,8 +6,8 @@ describe QualtricsAPI::PanelMemberCollection do
6
6
  end
7
7
 
8
8
  describe "#find, #[]" do
9
- let(:panel_member_1) { QualtricsAPI::PanelMember.new("panelMemberId" => "p1") }
10
- let(:panel_member_2) { QualtricsAPI::PanelMember.new("panelMemberId" => "p2") }
9
+ let(:panel_member_1) { QualtricsAPI::PanelMember.new("recipientID" => "p1") }
10
+ let(:panel_member_2) { QualtricsAPI::PanelMember.new("recipientID" => "p2") }
11
11
 
12
12
  it "finds the panel member by id" do
13
13
  subject.instance_variable_set :@all, [panel_member_1, panel_member_2]
@@ -65,7 +65,7 @@ describe QualtricsAPI::PanelMemberCollection do
65
65
  QualtricsAPI.panels.fetch['ML_bC2c5xBz1DxyOYB'].members.create(panel_members)
66
66
  end
67
67
  end
68
-
68
+
69
69
  describe "when success" do
70
70
  let(:cassette) { "panel_member_collection_create_success" }
71
71
  let(:panel_members) { [QualtricsAPI::PanelMember.new(first_name: 'Marcin', last_name: 'Naglik', email: 'test@test.com')] }
@@ -73,7 +73,7 @@ describe QualtricsAPI::PanelMemberCollection do
73
73
  it "returns PanelImport" do
74
74
  expect(result).to be_a QualtricsAPI::PanelImport
75
75
  end
76
-
76
+
77
77
  it "returns PanelImport with id" do
78
78
  expect(result.id).to eq('PGRS_bEJLYLkqMBs8Bwx')
79
79
  end
@@ -88,7 +88,7 @@ describe QualtricsAPI::PanelMemberCollection do
88
88
  let(:panel_members) { [QualtricsAPI::PanelMember.new] }
89
89
 
90
90
  it "returns results" do
91
- expect { result }.to raise_error
91
+ expect { result }.to raise_error
92
92
  end
93
93
  end
94
94
  end
@@ -3,13 +3,13 @@ require 'spec_helper'
3
3
  describe QualtricsAPI::PanelMember do
4
4
  let(:panel_member) do
5
5
  {
6
- "panelMemberId" => "ML_abcdefg",
6
+ "recipientID" => "ML_abcdefg",
7
7
  "firstName" => "Thom",
8
8
  "lastName" => "Yorke",
9
9
  "email" => "thom@radiohead.com",
10
10
  "language" => "EN",
11
11
  "unsubscribed" => 1,
12
- "externalDataReference" => "1234",
12
+ "externalReference" => "1234",
13
13
  "embeddedData" => { "a" => "b", "b" => "c" }
14
14
  }
15
15
  end
@@ -17,7 +17,7 @@ describe QualtricsAPI::PanelMember do
17
17
  subject { described_class.new panel_member }
18
18
 
19
19
  it "has a panel member id" do
20
- expect(subject.id).to eq(panel_member["panelMemberId"])
20
+ expect(subject.id).to eq(panel_member["recipientID"])
21
21
  end
22
22
 
23
23
  it "has a first name" do
@@ -41,7 +41,7 @@ describe QualtricsAPI::PanelMember do
41
41
  end
42
42
 
43
43
  it "has external data reference" do
44
- expect(subject.external_data_reference).to eq(panel_member["externalDataReference"])
44
+ expect(subject.external_reference).to eq(panel_member["externalReference"])
45
45
  end
46
46
 
47
47
  it "has embedded data" do
@@ -52,13 +52,13 @@ describe QualtricsAPI::PanelMember do
52
52
  let(:members) { [subject].to_json }
53
53
  it "serialize array of panel members" do
54
54
  expect(JSON.parse(members)).to eq(
55
- [{ "PanelMemberId" => "ML_abcdefg",
55
+ [{ "RecipientID" => "ML_abcdefg",
56
56
  "FirstName" => "Thom",
57
57
  "LastName" => "Yorke",
58
58
  "Email" => "thom@radiohead.com",
59
59
  "Language" => "EN",
60
60
  "Unsubscribed" => 1,
61
- "ExternalDataReference" => "1234",
61
+ "ExternalReference" => "1234",
62
62
  "EmbeddedData" => { "a" => "b", "b" => "c" } }])
63
63
  end
64
64
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qualtrics_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yurui Zhang
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-07-22 00:00:00.000000000 Z
13
+ date: 2015-07-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday