soapy_cake 2.1.5 → 2.1.6
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 +4 -4
- data/.ruby-version +1 -1
- data/api.yml +1 -2
- data/lib/soapy_cake/admin_track.rb +3 -1
- data/lib/soapy_cake/request_mass_conversion_insert.rb +16 -0
- data/lib/soapy_cake/version.rb +1 -1
- data/soapy_cake.gemspec +1 -0
- data/spec/fixtures/vcr_cassettes/SoapyCake_AdminTrack/_mass_conversion_insert/inserts_conversions.yml +22 -12
- data/spec/integration/soapy_cake/admin_track_spec.rb +6 -2
- data/spec/spec_helper.rb +1 -0
- metadata +18 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 261b8c302bc81cb8b4836cd3165a3a1733ad454c
|
4
|
+
data.tar.gz: a92becdefc65a1bcfdb366dee8c4c13903d4d3b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 112e8a8644afc6dab8168bf2eb1dde11b8198de32aa154409d1ebda8271136491187dedc398a7d3e24321f128fd504ce60a164587dba89b16cad7f26e5e08c98
|
7
|
+
data.tar.gz: 5a27e9132ffddb8adcba3df5143aa5263120a3057255b9c7920e5d2bc0b9e46af5a9595040c4c2962bb905fb04a0c3c8e3db7f8beaf416c04425b1be46297d86
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.4
|
data/api.yml
CHANGED
@@ -98,8 +98,7 @@ versions:
|
|
98
98
|
conversion_dispositions: 2
|
99
99
|
decrypt_affiliate_link: 1
|
100
100
|
mass_conversion_adjustment: 2
|
101
|
-
|
102
|
-
mass_conversion_insert: 1
|
101
|
+
mass_conversion_insert: 2
|
103
102
|
rejected_dispositions: 1
|
104
103
|
update_conversion: 4
|
105
104
|
update_conversion_disposition: 2
|
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'soapy_cake/request_mass_conversion_insert'
|
4
|
+
|
3
5
|
module SoapyCake
|
4
6
|
class AdminTrack < Client
|
5
7
|
include Helper
|
@@ -21,7 +23,7 @@ module SoapyCake
|
|
21
23
|
campaign_id creative_id total_to_insert
|
22
24
|
])
|
23
25
|
|
24
|
-
run
|
26
|
+
run RequestMassConversionInsert.new(:admin, :track, :mass_conversion_insert, opts)
|
25
27
|
end
|
26
28
|
|
27
29
|
def update_conversion(opts)
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module SoapyCake
|
4
|
+
class RequestMassConversionInsert < Request
|
5
|
+
private
|
6
|
+
|
7
|
+
# There is a bug in MassConversionInsert version 2 API in cake,
|
8
|
+
# in which xmlns is still using version 1.
|
9
|
+
def xml_namespaces
|
10
|
+
{
|
11
|
+
'xmlns:env' => 'http://www.w3.org/2003/05/soap-envelope',
|
12
|
+
'xmlns:cake' => 'http://cakemarketing.com/api/1/'
|
13
|
+
}
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/soapy_cake/version.rb
CHANGED
data/soapy_cake.gemspec
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://cake-partner-domain.com/api/
|
5
|
+
uri: https://cake-partner-domain.com/api/2/track.asmx
|
6
6
|
body:
|
7
|
-
encoding:
|
7
|
+
encoding: ASCII-8BIT
|
8
8
|
string: |
|
9
9
|
<?xml version="1.0"?>
|
10
10
|
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:cake="http://cakemarketing.com/api/1/">
|
@@ -12,18 +12,28 @@ http_interactions:
|
|
12
12
|
<env:Body>
|
13
13
|
<cake:MassConversionInsert>
|
14
14
|
<cake:api_key>cake-api-key</cake:api_key>
|
15
|
-
<cake:conversion_date>2015-05-
|
15
|
+
<cake:conversion_date>2015-05-07T02:00:00</cake:conversion_date>
|
16
16
|
<cake:affiliate_id>16059</cake:affiliate_id>
|
17
17
|
<cake:campaign_id>13268</cake:campaign_id>
|
18
18
|
<cake:sub_affiliate/>
|
19
19
|
<cake:creative_id>5521</cake:creative_id>
|
20
|
-
<cake:total_to_insert>
|
20
|
+
<cake:total_to_insert>3</cake:total_to_insert>
|
21
|
+
<cake:note>Test created on 2017-07-24</cake:note>
|
22
|
+
<cake:payout>0.1</cake:payout>
|
23
|
+
<cake:received>0.2</cake:received>
|
24
|
+
<cake:transaction_ids>test-transaction-id-1,test-transaction-id-2,test-transaction-id-3</cake:transaction_ids>
|
21
25
|
</cake:MassConversionInsert>
|
22
26
|
</env:Body>
|
23
27
|
</env:Envelope>
|
24
28
|
headers:
|
25
29
|
Content-Type:
|
26
30
|
- application/soap+xml;charset=UTF-8
|
31
|
+
Accept-Encoding:
|
32
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
33
|
+
Accept:
|
34
|
+
- "*/*"
|
35
|
+
User-Agent:
|
36
|
+
- Ruby
|
27
37
|
response:
|
28
38
|
status:
|
29
39
|
code: 200
|
@@ -31,18 +41,18 @@ http_interactions:
|
|
31
41
|
headers:
|
32
42
|
Cache-Control:
|
33
43
|
- private, max-age=0
|
44
|
+
Content-Length:
|
45
|
+
- '464'
|
34
46
|
Content-Type:
|
35
47
|
- application/soap+xml; charset=utf-8
|
36
|
-
|
37
|
-
-
|
48
|
+
Date:
|
49
|
+
- Mon, 24 Jul 2017 19:42:39 GMT
|
38
50
|
X-Aspnet-Version:
|
39
51
|
- 4.0.30319
|
40
52
|
X-Powered-By:
|
41
53
|
- ASP.NET
|
42
|
-
|
43
|
-
-
|
44
|
-
Content-Length:
|
45
|
-
- '464'
|
54
|
+
Connection:
|
55
|
+
- close
|
46
56
|
body:
|
47
57
|
encoding: UTF-8
|
48
58
|
string: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
|
@@ -50,5 +60,5 @@ http_interactions:
|
|
50
60
|
xmlns="http://cakemarketing.com/api/1/"><MassConversionInsertResult><success>true</success><message>Conversions
|
51
61
|
Inserted</message></MassConversionInsertResult></MassConversionInsertResponse></soap:Body></soap:Envelope>
|
52
62
|
http_version:
|
53
|
-
recorded_at:
|
54
|
-
recorded_with: VCR
|
63
|
+
recorded_at: Mon, 24 Jul 2017 19:42:40 GMT
|
64
|
+
recorded_with: VCR 3.0.3
|
@@ -8,12 +8,16 @@ RSpec.describe SoapyCake::AdminTrack do
|
|
8
8
|
describe '#mass_conversion_insert', :vcr do
|
9
9
|
it 'inserts conversions' do
|
10
10
|
result = admin_track.mass_conversion_insert(
|
11
|
-
conversion_date: Date.new(2015, 5,
|
11
|
+
conversion_date: Date.new(2015, 5, 7),
|
12
12
|
affiliate_id: 16059,
|
13
13
|
campaign_id: 13268,
|
14
14
|
sub_affiliate: '',
|
15
15
|
creative_id: 5521,
|
16
|
-
total_to_insert:
|
16
|
+
total_to_insert: 3,
|
17
|
+
note: 'Test created on 2017-07-24',
|
18
|
+
payout: 0.1,
|
19
|
+
received: 0.2,
|
20
|
+
transaction_ids: (1..3).map { |i| "test-transaction-id-#{i}" }.join(',')
|
17
21
|
)
|
18
22
|
|
19
23
|
expect(result).to eq(success: true, message: 'Conversions Inserted')
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soapy_cake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ad2games GmbH
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -164,6 +164,20 @@ dependencies:
|
|
164
164
|
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: dotenv
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
167
181
|
description: Simple client for the CAKE API (http://getcake.com)
|
168
182
|
email:
|
169
183
|
- developers@ad2games.com
|
@@ -194,6 +208,7 @@ files:
|
|
194
208
|
- lib/soapy_cake/helper.rb
|
195
209
|
- lib/soapy_cake/modification_type.rb
|
196
210
|
- lib/soapy_cake/request.rb
|
211
|
+
- lib/soapy_cake/request_mass_conversion_insert.rb
|
197
212
|
- lib/soapy_cake/response.rb
|
198
213
|
- lib/soapy_cake/response_value.rb
|
199
214
|
- lib/soapy_cake/time_converter.rb
|
@@ -271,7 +286,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
271
286
|
version: '0'
|
272
287
|
requirements: []
|
273
288
|
rubyforge_project:
|
274
|
-
rubygems_version: 2.5.
|
289
|
+
rubygems_version: 2.5.2
|
275
290
|
signing_key:
|
276
291
|
specification_version: 4
|
277
292
|
summary: Simple client for the CAKE API
|