soapy_cake 1.25.2 → 1.26.0

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
  SHA1:
3
- metadata.gz: 1321d74f53687f87ede80c9d57c96cd0071243f3
4
- data.tar.gz: 2a959b7fe70c1bbac22d7e798cd7c1eb76bc20ee
3
+ metadata.gz: f0200aa227f1f26c12610300c9848a22b831433a
4
+ data.tar.gz: 515fda58cc88b35ef23ecfbd83f3bb7dc250bce1
5
5
  SHA512:
6
- metadata.gz: e7217c43f14f3b57ac1b104dfd64924e0f45a120147814ab2dfb4f8bf05efc2dca2d0ce709dd3eff418c3588b3d0049ac58458119bdde00a4a1f62b9d1e6b314
7
- data.tar.gz: 64d9af5457a4fd531a01c26f7f02311ef73abbb2027fd5cc9dcf3d8204fd01d844cfeb5e27166af65974f6fda62bf993fe5eb7ae888f6d8dff7abd91c0ee2d49
6
+ metadata.gz: 57058b8a99b05a26c4ee21c0c21b818a957281d0125c56925d764caa07d2f6baeb2e7ec6b217ba27efeeed0cef641d04e19bf17e864fe6b5574b968a26fe00b3
7
+ data.tar.gz: 22554ab098bcbe0f909539b1ecf2bf72b4745e4fc7d8b10428cb490d526c7dc60cbb8a24b37f8e80c58292d70435e7a3f7a2339f3f6fd53aa1cfc627ed55dd2f
@@ -70,6 +70,11 @@ module SoapyCake
70
70
  offer_contract_is_default use_fallback_targeting
71
71
  ).freeze
72
72
 
73
+ REQUIRED_NEW_CAMPAIGN_PARAMS = %i(
74
+ affiliate_id offer_id account_status_id payout
75
+ redirect_404 clear_session_on_conversion paid_upsells
76
+ ).freeze
77
+
73
78
  CAMPAIGN_UPDATE_DEFAULT_OPTIONS = {
74
79
  account_status_id: :no_change,
75
80
  auto_disposition_delay_hours: 0,
@@ -187,7 +192,7 @@ module SoapyCake
187
192
  end
188
193
 
189
194
  def add_campaign(opts)
190
- require_params(opts, %i(affiliate_id offer_id account_status_id payout))
195
+ require_params(opts, REQUIRED_NEW_CAMPAIGN_PARAMS)
191
196
  addedit_campaign(opts.merge(campaign_id: 0, expiration_date: future_expiration_date))
192
197
  end
193
198
 
@@ -258,6 +263,7 @@ module SoapyCake
258
263
  end
259
264
 
260
265
  def addedit_campaign(opts)
266
+ opts = translate_booleans(opts)
261
267
  opts = translate_values(opts, %i(account_status_id))
262
268
  opts = opts.reverse_merge(display_link_type_id: 1)
263
269
  run Request.new(:admin, :addedit, :campaign, opts)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module SoapyCake
3
- VERSION = '1.25.2'
3
+ VERSION = '1.26.0'
4
4
  end
@@ -18,6 +18,9 @@ http_interactions:
18
18
  <cake:media_type_id>1</cake:media_type_id>
19
19
  <cake:account_status_id>1</cake:account_status_id>
20
20
  <cake:payout>1.23</cake:payout>
21
+ <cake:redirect_404>off</cake:redirect_404>
22
+ <cake:clear_session_on_conversion>off</cake:clear_session_on_conversion>
23
+ <cake:paid_upsells>off</cake:paid_upsells>
21
24
  <cake:campaign_id>0</cake:campaign_id>
22
25
  <cake:expiration_date>2045-02-09T01:00:00</cake:expiration_date>
23
26
  </cake:Campaign>
@@ -26,6 +29,12 @@ http_interactions:
26
29
  headers:
27
30
  Content-Type:
28
31
  - application/soap+xml;charset=UTF-8
32
+ Accept-Encoding:
33
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
34
+ Accept:
35
+ - "*/*"
36
+ User-Agent:
37
+ - Ruby
29
38
  response:
30
39
  status:
31
40
  code: 200
@@ -42,7 +51,7 @@ http_interactions:
42
51
  X-Powered-By:
43
52
  - ASP.NET
44
53
  Date:
45
- - Wed, 04 May 2016 09:44:12 GMT
54
+ - Thu, 15 Sep 2016 14:26:47 GMT
46
55
  Content-Length:
47
56
  - '629'
48
57
  body:
@@ -50,7 +59,7 @@ http_interactions:
50
59
  string: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
51
60
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><CampaignResponse
52
61
  xmlns="http://cakemarketing.com/api/3/"><CampaignResult><success>true</success><message>Campaign
53
- Created</message><success_info><campaign_id>22081</campaign_id><affiliate_id>1</affiliate_id><offer_id>8910</offer_id><offer_contract_id>1455</offer_contract_id><media_type_id>1</media_type_id><original>false</original></success_info></CampaignResult></CampaignResponse></soap:Body></soap:Envelope>
62
+ Created</message><success_info><campaign_id>23305</campaign_id><affiliate_id>1</affiliate_id><offer_id>8910</offer_id><offer_contract_id>1455</offer_contract_id><media_type_id>1</media_type_id><original>false</original></success_info></CampaignResult></CampaignResponse></soap:Body></soap:Envelope>
54
63
  http_version:
55
64
  recorded_at: Tue, 17 Feb 2015 12:00:00 GMT
56
- recorded_with: VCR 3.0.1
65
+ recorded_with: VCR 3.0.3
@@ -291,7 +291,10 @@ RSpec.describe SoapyCake::AdminAddedit do
291
291
  offer_id: offer_id,
292
292
  media_type_id: 1,
293
293
  account_status_id: :active,
294
- payout: '1.23'
294
+ payout: '1.23',
295
+ redirect_404: false,
296
+ clear_session_on_conversion: false,
297
+ paid_upsells: false
295
298
  )
296
299
 
297
300
  expect(result[:message]).to eq('Campaign Created')
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: 1.25.2
4
+ version: 1.26.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ad2games GmbH
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-22 00:00:00.000000000 Z
11
+ date: 2016-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -257,7 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
257
257
  version: '0'
258
258
  requirements: []
259
259
  rubyforge_project:
260
- rubygems_version: 2.5.1
260
+ rubygems_version: 2.6.6
261
261
  signing_key:
262
262
  specification_version: 4
263
263
  summary: Simple client for the CAKE API