soapy_cake 2.2.4 → 2.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.ruby-version +1 -1
- data/lib/soapy_cake/campaigns.rb +9 -8
- data/lib/soapy_cake/client.rb +9 -11
- data/lib/soapy_cake/version.rb +1 -1
- data/spec/fixtures/vcr_cassettes/SoapyCake_Campaigns/_patch/different_pre-existing_values/does_not_change_anything_unintentionally_attribute_set_0_.yml +0 -1
- data/spec/fixtures/vcr_cassettes/SoapyCake_Campaigns/_patch/different_pre-existing_values/does_not_change_anything_unintentionally_attribute_set_1_.yml +0 -1
- data/spec/fixtures/vcr_cassettes/SoapyCake_Campaigns/_patch/updates_a_campaign.yml +0 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: eb3bcbb80c4153edac27b6d2369ec411cb5aef99a3b23296d080847eb3292f51
|
4
|
+
data.tar.gz: 19e63f665281cdb7c2cacee1dcff97e131faad35890f69aa3011910fe4e6c8ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 054ed6a30bbc79ea7b7c0c5e9eefaec5cb298377b98567f82776036393a2c348b72ade2c5927f0128ce4dc40744da1da120ae0f09ba636921251494e83ec6e58
|
7
|
+
data.tar.gz: b8ca98057e6e01ad4329ed9397c44b4c0394f06cbd2616f52f656259775761778e1cef50be61bcb1530d4614d33a1e2fc20866d5adb1da6a55cd1c2c73bc0157
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.5.1
|
data/lib/soapy_cake/campaigns.rb
CHANGED
@@ -8,12 +8,12 @@ module SoapyCake
|
|
8
8
|
# be in the list.
|
9
9
|
ALL_PARAMS = %i[
|
10
10
|
account_status_id affiliate_id auto_disposition_delay_hours campaign_id
|
11
|
-
clear_session_on_conversion currency_id
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
clear_session_on_conversion currency_id expiration_date
|
12
|
+
expiration_date_modification_type media_type_id offer_contract_id
|
13
|
+
offer_id paid paid_redirects paid_upsells payout payout_update_option
|
14
|
+
pixel_html postback_delay_ms postback_url redirect_404 redirect_domain
|
15
|
+
redirect_offer_contract_id review test_link third_party_name
|
16
|
+
unique_key_hash use_offer_contract_payout
|
17
17
|
].freeze
|
18
18
|
|
19
19
|
NO_CHANGE_VALUES = {
|
@@ -54,13 +54,14 @@ module SoapyCake
|
|
54
54
|
nil
|
55
55
|
end
|
56
56
|
|
57
|
+
# The default for `display_link_type_id` is "Fallback" in Cake, which
|
58
|
+
# doesn't have an ID and, hence, cannot be set via the API. In order to not
|
59
|
+
# change it, it has to be absent from the request.
|
57
60
|
def patch(campaign_id, opts = {})
|
58
61
|
campaign = get(campaign_id: campaign_id).first
|
59
62
|
opts = NO_CHANGE_VALUES
|
60
63
|
.merge(
|
61
64
|
affiliate_id: campaign.fetch(:affiliate).fetch(:affiliate_id),
|
62
|
-
# Only present in production:
|
63
|
-
display_link_type_id: campaign.dig(:display_link_type, :link_display_type_id) || 1,
|
64
65
|
media_type_id: campaign.fetch(:media_type).fetch(:media_type_id),
|
65
66
|
offer_contract_id: campaign.fetch(:offer_contract).fetch(:offer_contract_id),
|
66
67
|
offer_id: campaign.fetch(:offer).fetch(:offer_id),
|
data/lib/soapy_cake/client.rb
CHANGED
@@ -29,17 +29,15 @@ module SoapyCake
|
|
29
29
|
request.time_converter = time_converter
|
30
30
|
|
31
31
|
with_retries do
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
)
|
42
|
-
end
|
32
|
+
response = Response.new(response_body(request), request.short_response?, time_converter)
|
33
|
+
xml_response? ? response.to_xml : response.to_enum
|
34
|
+
rescue RequestFailed => e
|
35
|
+
raise RequestFailed.new(
|
36
|
+
e.message,
|
37
|
+
request_path: request.path,
|
38
|
+
request_body: request.xml,
|
39
|
+
response_body: e.response_body || response.body
|
40
|
+
)
|
43
41
|
end
|
44
42
|
end
|
45
43
|
|
data/lib/soapy_cake/version.rb
CHANGED
@@ -252,7 +252,6 @@ http_interactions:
|
|
252
252
|
<cake:clear_session_on_conversion>no_change</cake:clear_session_on_conversion>
|
253
253
|
<cake:postback_delay_ms>-1</cake:postback_delay_ms>
|
254
254
|
<cake:affiliate_id>9643</cake:affiliate_id>
|
255
|
-
<cake:display_link_type_id>1</cake:display_link_type_id>
|
256
255
|
<cake:media_type_id>1</cake:media_type_id>
|
257
256
|
<cake:offer_contract_id>10338</cake:offer_contract_id>
|
258
257
|
<cake:offer_id>11390</cake:offer_id>
|
@@ -254,7 +254,6 @@ http_interactions:
|
|
254
254
|
<cake:clear_session_on_conversion>no_change</cake:clear_session_on_conversion>
|
255
255
|
<cake:postback_delay_ms>-1</cake:postback_delay_ms>
|
256
256
|
<cake:affiliate_id>9643</cake:affiliate_id>
|
257
|
-
<cake:display_link_type_id>1</cake:display_link_type_id>
|
258
257
|
<cake:media_type_id>2</cake:media_type_id>
|
259
258
|
<cake:offer_contract_id>10342</cake:offer_contract_id>
|
260
259
|
<cake:offer_id>11390</cake:offer_id>
|
@@ -101,7 +101,6 @@ http_interactions:
|
|
101
101
|
<cake:clear_session_on_conversion>no_change</cake:clear_session_on_conversion>
|
102
102
|
<cake:postback_delay_ms>-1</cake:postback_delay_ms>
|
103
103
|
<cake:affiliate_id>9643</cake:affiliate_id>
|
104
|
-
<cake:display_link_type_id>1</cake:display_link_type_id>
|
105
104
|
<cake:media_type_id>1</cake:media_type_id>
|
106
105
|
<cake:offer_contract_id>10338</cake:offer_contract_id>
|
107
106
|
<cake:offer_id>11390</cake:offer_id>
|
@@ -326,7 +325,6 @@ http_interactions:
|
|
326
325
|
<cake:clear_session_on_conversion>no_change</cake:clear_session_on_conversion>
|
327
326
|
<cake:postback_delay_ms>-1</cake:postback_delay_ms>
|
328
327
|
<cake:affiliate_id>9643</cake:affiliate_id>
|
329
|
-
<cake:display_link_type_id>1</cake:display_link_type_id>
|
330
328
|
<cake:media_type_id>1</cake:media_type_id>
|
331
329
|
<cake:offer_contract_id>10338</cake:offer_contract_id>
|
332
330
|
<cake:offer_id>11390</cake:offer_id>
|
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.2.
|
4
|
+
version: 2.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ad2games GmbH
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -289,7 +289,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
289
289
|
version: '0'
|
290
290
|
requirements: []
|
291
291
|
rubyforge_project:
|
292
|
-
rubygems_version: 2.6
|
292
|
+
rubygems_version: 2.7.6
|
293
293
|
signing_key:
|
294
294
|
specification_version: 4
|
295
295
|
summary: Simple client for the CAKE API
|