soapy_cake 1.22.1 → 1.23.0

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: 491621f952c57a8d9f52076f6166166c71c4e7a0
4
- data.tar.gz: b7309f77d46d9ed03daf6f320fd32c64d2d97ffd
3
+ metadata.gz: 0473b8d2c2811b04a6e0a71e8a9b492398d95b80
4
+ data.tar.gz: 2c43ff5dccb0417b72952172e41eed102e13b0b7
5
5
  SHA512:
6
- metadata.gz: 2b96544d7e713cb1ceccc4073a7246b4cb3fe6e2d2ab4bf9ebcee12e710ce3a70b09c6c8a5258d3a1911a8d10bd7b8a20078ae5519727477f1e5385eb8886f6b
7
- data.tar.gz: d866495514cd196bd4e8735c8e5240b7ebff496d4989a2ca718adc9d075dbb53b7dfe1dde2e6c7c6dd1738f3ced68eb9525eba227d739750f5cb7defa8b27773
6
+ metadata.gz: 02242b513f67d51c244c3dbe40e90d3e7161dfc730761b01b3ec19e39b7a227a513582225e7ff90c2109333fcb216d03bdef86ef6aa9d3fb0e44946f460cfdc2
7
+ data.tar.gz: 54866733e6fa981eb41b02f7ecdd1d13465659463916922a9c485cdb9af2890e149cbcd02a11c5071d463abe2305770181183648b3161a907349c96300fb25ba
@@ -164,6 +164,10 @@ module SoapyCake
164
164
  run Request.new(:admin, :addedit, :affiliate, opts)
165
165
  end
166
166
 
167
+ def create_advertiser(opts)
168
+ run Request.new(:admin, :addedit, :advertiser, opts.merge(advertiser_id: 0))
169
+ end
170
+
167
171
  def add_campaign(opts)
168
172
  addedit_campaign(opts.merge(campaign_id: 0))
169
173
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module SoapyCake
3
- VERSION = '1.22.1'
3
+ VERSION = '1.23.0'
4
4
  end
@@ -0,0 +1,51 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://cake-partner-domain.com/api/1/addedit.asmx
6
+ body:
7
+ encoding: UTF-8
8
+ string: |
9
+ <?xml version="1.0"?>
10
+ <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:cake="http://cakemarketing.com/api/1/">
11
+ <env:Header/>
12
+ <env:Body>
13
+ <cake:Advertiser>
14
+ <cake:api_key>cake-api-key</cake:api_key>
15
+ <cake:advertiser_name>Foxy Fox</cake:advertiser_name>
16
+ <cake:account_status_id>1</cake:account_status_id>
17
+ <cake:advertiser_id>0</cake:advertiser_id>
18
+ </cake:Advertiser>
19
+ </env:Body>
20
+ </env:Envelope>
21
+ headers:
22
+ Content-Type:
23
+ - application/soap+xml;charset=UTF-8
24
+ response:
25
+ status:
26
+ code: 200
27
+ message: OK
28
+ headers:
29
+ Cache-Control:
30
+ - private, max-age=0
31
+ Content-Type:
32
+ - application/soap+xml; charset=utf-8
33
+ Server:
34
+ - Microsoft-IIS/8.5
35
+ X-Aspnet-Version:
36
+ - 4.0.30319
37
+ X-Powered-By:
38
+ - ASP.NET
39
+ Date:
40
+ - Wed, 30 Mar 2016 11:37:34 GMT
41
+ Content-Length:
42
+ - '464'
43
+ body:
44
+ encoding: UTF-8
45
+ string: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
46
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><AdvertiserResponse
47
+ xmlns="http://cakemarketing.com/api/1/"><AdvertiserResult><success>true</success><message>Advertiser
48
+ 15908 Created</message><advertiser_id>15908</advertiser_id></AdvertiserResult></AdvertiserResponse></soap:Body></soap:Envelope>
49
+ http_version:
50
+ recorded_at: Tue, 17 Feb 2015 12:00:00 GMT
51
+ recorded_with: VCR 3.0.1
@@ -22,6 +22,17 @@ RSpec.describe SoapyCake::AdminAddedit do
22
22
  end
23
23
  end
24
24
 
25
+ describe 'advertisers', :vcr do
26
+ it 'creates advertisers' do
27
+ result = subject.create_advertiser(
28
+ advertiser_name: 'Foxy Fox',
29
+ account_status_id: 1
30
+ )
31
+
32
+ expect(result).to include(advertiser_id: 15908)
33
+ end
34
+ end
35
+
25
36
  describe 'contacts', :vcr do
26
37
  it 'edits a contact' do
27
38
  result = subject.edit_contact(
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.22.1
4
+ version: 1.23.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-02-18 00:00:00.000000000 Z
11
+ date: 2016-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -221,6 +221,7 @@ files:
221
221
  - spec/fixtures/vcr_cassettes/SoapyCake_Admin/returns_a_clicks_report_with_a_defined_time_range.yml
222
222
  - spec/fixtures/vcr_cassettes/SoapyCake_Admin/returns_an_affiliate_with_correct_data_types.yml
223
223
  - spec/fixtures/vcr_cassettes/SoapyCake_Admin/returns_media_types.yml
224
+ - spec/fixtures/vcr_cassettes/SoapyCake_AdminAddedit/advertisers/creates_advertisers.yml
224
225
  - spec/fixtures/vcr_cassettes/SoapyCake_AdminAddedit/affiliates/edits_affiliates.yml
225
226
  - spec/fixtures/vcr_cassettes/SoapyCake_AdminAddedit/campaigns/adds_a_campaign.yml
226
227
  - spec/fixtures/vcr_cassettes/SoapyCake_AdminAddedit/campaigns/edits_a_campaign.yml
@@ -286,6 +287,7 @@ test_files:
286
287
  - spec/fixtures/vcr_cassettes/SoapyCake_Admin/returns_a_clicks_report_with_a_defined_time_range.yml
287
288
  - spec/fixtures/vcr_cassettes/SoapyCake_Admin/returns_an_affiliate_with_correct_data_types.yml
288
289
  - spec/fixtures/vcr_cassettes/SoapyCake_Admin/returns_media_types.yml
290
+ - spec/fixtures/vcr_cassettes/SoapyCake_AdminAddedit/advertisers/creates_advertisers.yml
289
291
  - spec/fixtures/vcr_cassettes/SoapyCake_AdminAddedit/affiliates/edits_affiliates.yml
290
292
  - spec/fixtures/vcr_cassettes/SoapyCake_AdminAddedit/campaigns/adds_a_campaign.yml
291
293
  - spec/fixtures/vcr_cassettes/SoapyCake_AdminAddedit/campaigns/edits_a_campaign.yml