soapy_cake 1.7.1 → 1.7.2
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_versions.yml +1 -1
- data/lib/soapy_cake/admin_addedit.rb +6 -0
- data/lib/soapy_cake/version.rb +1 -1
- data/spec/fixtures/vcr_cassettes/SoapyCake_AdminAddedit/contacts/edits_a_contact.yml +50 -0
- data/spec/integration/soapy_cake/admin_addedit_spec.rb +16 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f734b8e9381f7bbca9559e4d57f507136973c0eb
|
4
|
+
data.tar.gz: a6e5eea51cf350523cb33f49214f6f73efbff7cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb60c6a3a8a3be6f42e1b573820d47557402cf476354914e26bb54869cbe59146233e8c77b6f4bf98f5330280d8a962cdad2270501c655d0138f40de0ad04911
|
7
|
+
data.tar.gz: 82712fbdadbfec95211fe6d2632fe559f5d9419ea8924ba76e80c8cb7e665d416f5d925f4477350d18ff898bd41ddee551f11a7467b4ba4a765fb785fe9eb439
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.
|
1
|
+
2.2.2
|
data/api_versions.yml
CHANGED
@@ -81,6 +81,12 @@ module SoapyCake
|
|
81
81
|
addedit_offer(opts)
|
82
82
|
end
|
83
83
|
|
84
|
+
def edit_contact(opts)
|
85
|
+
require_params(opts, %i(entity_id contact_id contact_email_address))
|
86
|
+
|
87
|
+
run Request.new(:admin, :addedit, :contact, opts)
|
88
|
+
end
|
89
|
+
|
84
90
|
def add_geo_targets(opts = {})
|
85
91
|
require_params(opts, %i(offer_contract_id allow_countries))
|
86
92
|
|
data/lib/soapy_cake/version.rb
CHANGED
@@ -0,0 +1,50 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://cake-partner-domain.com/api/2/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/2/">
|
11
|
+
<env:Header/>
|
12
|
+
<env:Body>
|
13
|
+
<cake:Contact>
|
14
|
+
<cake:api_key>cake-api-key</cake:api_key>
|
15
|
+
<cake:entity_id>15886</cake:entity_id>
|
16
|
+
<cake:contact_id>8814</cake:contact_id>
|
17
|
+
<cake:contact_email_address>fox@rabbit.com</cake:contact_email_address>
|
18
|
+
</cake:Contact>
|
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.0
|
35
|
+
X-Aspnet-Version:
|
36
|
+
- 4.0.30319
|
37
|
+
X-Powered-By:
|
38
|
+
- ASP.NET
|
39
|
+
Date:
|
40
|
+
- Wed, 10 Jun 2015 13:37:08 GMT
|
41
|
+
Content-Length:
|
42
|
+
- '439'
|
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><ContactResponse
|
47
|
+
xmlns="http://cakemarketing.com/api/2/"><ContactResult><success>true</success><message>Contact Updated</message><contact_id>8814</contact_id></ContactResult></ContactResponse></soap:Body></soap:Envelope>
|
48
|
+
http_version:
|
49
|
+
recorded_at: Tue, 17 Feb 2015 12:00:00 GMT
|
50
|
+
recorded_with: VCR 2.9.3
|
@@ -2,6 +2,7 @@ RSpec.describe SoapyCake::AdminAddedit do
|
|
2
2
|
around { |example| Timecop.freeze(Time.utc(2015, 2, 17, 12), &example) }
|
3
3
|
|
4
4
|
let(:advertiser_id) { 15886 }
|
5
|
+
let(:contact_id) { 8814 }
|
5
6
|
let(:vertical_id) { 41 }
|
6
7
|
let(:offer_id) { 8910 }
|
7
8
|
let(:offer_contract_id) { 1456 }
|
@@ -19,6 +20,21 @@ RSpec.describe SoapyCake::AdminAddedit do
|
|
19
20
|
end
|
20
21
|
end
|
21
22
|
|
23
|
+
describe 'contacts', :vcr do
|
24
|
+
it 'edits a contact' do
|
25
|
+
result = subject.edit_contact(
|
26
|
+
entity_id: advertiser_id,
|
27
|
+
contact_id: contact_id,
|
28
|
+
contact_email_address: 'fox@rabbit.com'
|
29
|
+
)
|
30
|
+
|
31
|
+
expect(result).to include(
|
32
|
+
success: true,
|
33
|
+
contact_id: contact_id
|
34
|
+
)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
22
38
|
describe 'offers' do
|
23
39
|
it 'creates an offer', :vcr do
|
24
40
|
result = subject.add_offer(
|
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.7.
|
4
|
+
version: 1.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ad2games GmbH
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -199,6 +199,7 @@ files:
|
|
199
199
|
- spec/fixtures/vcr_cassettes/SoapyCake_Admin/returns_a_clicks_report_with_a_defined_time_range.yml
|
200
200
|
- spec/fixtures/vcr_cassettes/SoapyCake_Admin/returns_an_affiliate_with_correct_data_types.yml
|
201
201
|
- spec/fixtures/vcr_cassettes/SoapyCake_AdminAddedit/affiliates/edits_affiliates.yml
|
202
|
+
- spec/fixtures/vcr_cassettes/SoapyCake_AdminAddedit/contacts/edits_a_contact.yml
|
202
203
|
- spec/fixtures/vcr_cassettes/SoapyCake_AdminAddedit/geo_targeting/creates_geo_targetings.yml
|
203
204
|
- spec/fixtures/vcr_cassettes/SoapyCake_AdminAddedit/offer_/_offer_contract_caps/removes_a_cap_for_an_offer_contract.yml
|
204
205
|
- spec/fixtures/vcr_cassettes/SoapyCake_AdminAddedit/offer_/_offer_contract_caps/updates_a_cap_for_an_offer_contract.yml
|
@@ -238,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
238
239
|
version: '0'
|
239
240
|
requirements: []
|
240
241
|
rubyforge_project:
|
241
|
-
rubygems_version: 2.4.
|
242
|
+
rubygems_version: 2.4.8
|
242
243
|
signing_key:
|
243
244
|
specification_version: 4
|
244
245
|
summary: Simple client for the CAKE API
|
@@ -248,6 +249,7 @@ test_files:
|
|
248
249
|
- spec/fixtures/vcr_cassettes/SoapyCake_Admin/returns_a_clicks_report_with_a_defined_time_range.yml
|
249
250
|
- spec/fixtures/vcr_cassettes/SoapyCake_Admin/returns_an_affiliate_with_correct_data_types.yml
|
250
251
|
- spec/fixtures/vcr_cassettes/SoapyCake_AdminAddedit/affiliates/edits_affiliates.yml
|
252
|
+
- spec/fixtures/vcr_cassettes/SoapyCake_AdminAddedit/contacts/edits_a_contact.yml
|
251
253
|
- spec/fixtures/vcr_cassettes/SoapyCake_AdminAddedit/geo_targeting/creates_geo_targetings.yml
|
252
254
|
- spec/fixtures/vcr_cassettes/SoapyCake_AdminAddedit/offer_/_offer_contract_caps/removes_a_cap_for_an_offer_contract.yml
|
253
255
|
- spec/fixtures/vcr_cassettes/SoapyCake_AdminAddedit/offer_/_offer_contract_caps/updates_a_cap_for_an_offer_contract.yml
|