soapy_cake 1.6.4 → 1.6.5

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: ac960ad462bcff9507302302554a308cb2ec392a
4
- data.tar.gz: 853a756dfd3e95a8d2dc3b658f390bd06427be47
3
+ metadata.gz: 8693b7d6dc75f62ad7a22228a552b754c0557194
4
+ data.tar.gz: cc22a37f8128a85ecaf3930d930335ce129bdc45
5
5
  SHA512:
6
- metadata.gz: bf1e12250cb51b1f11394e0e8c95da9c364ef8cc7e3e4f018ec56765d3cbafe9931b604a646f7b991a7e8fe6d0565ed172f808c7e268c1edc1b8aa24faa51ec8
7
- data.tar.gz: fb9434baa59caf26f3886e917427679f7f6774918aa030f18793a2d9f281c3f4003b7a03d1772bfa816a1996fd1ceac17c5046a051811df32cbdd8a9a70f36f0
6
+ metadata.gz: a1131438d784fad5f18255362d64b5eefc874ceae2f8d1bd2bd9679cf8b8e1de11a87d652b470e2aff4489c156082d18d3209ecc0904d36abf64ffe2e128b420
7
+ data.tar.gz: 923832165f8abe2d93cd8f2e49b302dfaafa649844898e96e3e470501ff648eaf9c1b2ca36711e513cf30c743814d5e7a631b6f34580925e2077a526825d4ddf
@@ -128,6 +128,12 @@ module SoapyCake
128
128
  run Request.new(:admin, :addedit, :offer_tiers, opts)
129
129
  end
130
130
 
131
+ def edit_affiliate(opts)
132
+ require_params(opts, %i(affiliate_id))
133
+
134
+ run Request.new(:admin, :addedit, :affiliate, opts)
135
+ end
136
+
131
137
  private
132
138
 
133
139
  def translate_values!(opts, params)
@@ -1,3 +1,3 @@
1
1
  module SoapyCake
2
- VERSION = '1.6.4'
2
+ VERSION = '1.6.5'
3
3
  end
@@ -0,0 +1,49 @@
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:Affiliate>
14
+ <cake:api_key>cake-api-key</cake:api_key>
15
+ <cake:affiliate_id>1</cake:affiliate_id>
16
+ </cake:Affiliate>
17
+ </env:Body>
18
+ </env:Envelope>
19
+ headers:
20
+ Content-Type:
21
+ - application/soap+xml;charset=UTF-8
22
+ response:
23
+ status:
24
+ code: 200
25
+ message: OK
26
+ headers:
27
+ Cache-Control:
28
+ - private, max-age=0
29
+ Content-Type:
30
+ - application/soap+xml; charset=utf-8
31
+ Server:
32
+ - Microsoft-IIS/8.0
33
+ X-Aspnet-Version:
34
+ - 4.0.30319
35
+ X-Powered-By:
36
+ - ASP.NET
37
+ Date:
38
+ - Fri, 17 Apr 2015 10:55:25 GMT
39
+ Content-Length:
40
+ - '449'
41
+ body:
42
+ encoding: UTF-8
43
+ string: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
44
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><AffiliateResponse
45
+ xmlns="http://cakemarketing.com/api/2/"><AffiliateResult><success>true</success><message>Affiliate
46
+ 1 Updated</message><affiliate_id>1</affiliate_id></AffiliateResult></AffiliateResponse></soap:Body></soap:Envelope>
47
+ http_version:
48
+ recorded_at: Tue, 17 Feb 2015 12:00:00 GMT
49
+ recorded_with: VCR 2.9.3
@@ -10,6 +10,16 @@ RSpec.describe 'ADDEDIT integration test' do
10
10
  let(:redirect_offer_contract_id) { 1392 }
11
11
  let(:tier_id) { 4 }
12
12
 
13
+ describe 'affiliates', :vcr do
14
+ it 'edits affiliates' do
15
+ result = subject.edit_affiliate(
16
+ affiliate_id: 1
17
+ )
18
+
19
+ expect(result).to include(affiliate_id: 1)
20
+ end
21
+ end
22
+
13
23
  describe 'offers' do
14
24
  it 'creates an offer', :vcr do
15
25
  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.6.4
4
+ version: 1.6.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: 2015-04-13 00:00:00.000000000 Z
11
+ date: 2015-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -192,6 +192,7 @@ files:
192
192
  - lib/soapy_cake/response.rb
193
193
  - lib/soapy_cake/version.rb
194
194
  - soapy_cake.gemspec
195
+ - spec/fixtures/vcr_cassettes/ADDEDIT_integration_test/affiliates/edits_affiliates.yml
195
196
  - spec/fixtures/vcr_cassettes/ADDEDIT_integration_test/geo_targeting/creates_geo_targetings.yml
196
197
  - spec/fixtures/vcr_cassettes/ADDEDIT_integration_test/offer_/_offer_contract_caps/removes_a_cap_for_an_offer_contract.yml
197
198
  - spec/fixtures/vcr_cassettes/ADDEDIT_integration_test/offer_/_offer_contract_caps/updates_a_cap_for_an_offer_contract.yml
@@ -229,11 +230,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
229
230
  version: '0'
230
231
  requirements: []
231
232
  rubyforge_project:
232
- rubygems_version: 2.4.5
233
+ rubygems_version: 2.4.6
233
234
  signing_key:
234
235
  specification_version: 4
235
236
  summary: Simple client for the CAKE API
236
237
  test_files:
238
+ - spec/fixtures/vcr_cassettes/ADDEDIT_integration_test/affiliates/edits_affiliates.yml
237
239
  - spec/fixtures/vcr_cassettes/ADDEDIT_integration_test/geo_targeting/creates_geo_targetings.yml
238
240
  - spec/fixtures/vcr_cassettes/ADDEDIT_integration_test/offer_/_offer_contract_caps/removes_a_cap_for_an_offer_contract.yml
239
241
  - spec/fixtures/vcr_cassettes/ADDEDIT_integration_test/offer_/_offer_contract_caps/updates_a_cap_for_an_offer_contract.yml